Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BoundsRelativeToTop #945

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

Happypig375
Copy link

What does this implement/fix? Explain your changes.

There is currently no way to obtain the bounds of an element relative to the whole document instead of relative to the parent. This PR adds that.

@H1Gdev
Copy link
Contributor

H1Gdev commented Jan 24, 2022

What benefits does this PR have for users ?

@Happypig375
Copy link
Author

It can determine where to overlay HTML elements over SVG (input boxes), or determine collisions between elements given changing transforms and coordinates.

@Happypig375
Copy link
Author

This is a behavior I have to emulate myself by applying parent transforms to the bounds myself, by the way.

@H1Gdev
Copy link
Contributor

H1Gdev commented Jan 31, 2022

Can you give us concrete examples ?
We can not determine if this PR needs to be merged...

@paulushub paulushub self-requested a review December 28, 2023 12:04
@paulushub
Copy link
Contributor

paulushub commented Dec 28, 2023

@Happypig375 Please explain the need for this feature.
It is mostly GraphicsPath based operations, can this be implemented as extension method?

@paulushub paulushub self-assigned this Jan 14, 2024
@paulushub paulushub requested review from mrbean-bremen and removed request for paulushub January 20, 2024 13:58
@mrbean-bremen
Copy link
Member

@paulushub - I would rely on @H1Gdev to review this - I don't really have the inside to say if this is helpful.

@paulushub
Copy link
Contributor

@paulushub - I would rely on @H1Gdev to review this - I don't really have the inside to say if this is helpful.

Testing it now, having merged it into develop branch of my fork. You can checkout my branch, flip between master/develop
and see the difference. So far, it is a useful contribution.
Using the quick test-run dialog I submitted in my PR, this PR already resolved 3 of the 8 exceptions still in the W3C Test Suite (those failing).
So the enhancements to the bounding box computation is useful, with no breaking change so-far, that was why I requested your review.

In fact, I am currently improving the quick test-run dialog to better compare before and after PR changes in the tests.

@paulushub paulushub mentioned this pull request Jan 20, 2024
6 tasks
@mrbean-bremen
Copy link
Member

Well, that looks like you have sufficiently reviewed it yourself! Just go ahead in this case...

@Happypig375
Copy link
Author

I originally wanted to implement clickable buttons given an area inside the SVG. I later wrote this as an extension method in my code.

@paulushub
Copy link
Contributor

I originally wanted to implement clickable buttons given an area inside the SVG. I later wrote this as an extension method in my code.

Thanks so much for the updates. The PR will still be around as we learn what to include.

@paulushub paulushub removed their assignment Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants