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 fix for when within transform #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rmtmckenzie
Copy link

Calculates relative to sortable-list element for children and when it applies the transform subtracts the top and left.

This is because all events get position relative to window, but the transform is relative to the nearest parent with a transform. This means that without this fix, if something enclosing sortable-list has a transform, it breaks sortable-list by the difference between the top & left of the parent element and the top of the page. Because sortable-list now has a transform rotateZ(0), we are able to fix this by subtracting.

@rmtmckenzie
Copy link
Author

FYI have checked the demo and it still works with this change.

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