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

Rewrite Positioning Code #40

Merged
merged 11 commits into from
Jul 15, 2022
Merged

Rewrite Positioning Code #40

merged 11 commits into from
Jul 15, 2022

Conversation

nkappler
Copy link
Owner

Correct Min/Max Values for the menu's position are now calculated, even when the body has transforms and/or the page is zoomed/scrolled.

nkappler and others added 4 commits July 13, 2022 23:27
in preparation for bugfixes and improvements:
Positioning shouldn't take zoom and transform into account.
Menu shouldn't appear outside of viewport when body is larger than
viewport
this implementation is now functionally the same as before,
but without using getBoundingClientRect()
this should always calculate the correct bounds for positioning the
context menu, even if the body has a transform (even 3D transforms
work suprisingly well) or the page is zoomed and/or scrolled.

fixes #39
nkappler added 7 commits July 15, 2022 13:52
menu could be larger than viewport,
minX and minY calculation was wrong when scrolled,
event location was wrong when scrolled
@nkappler nkappler merged commit 0420619 into master Jul 15, 2022
@nkappler nkappler deleted the position branch July 15, 2022 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant