Skip to content

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