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

When container is zoomed, Drag does not sync with mouse cursor #2237

Open
Offbeatmammal opened this issue Apr 16, 2024 · 4 comments
Open

When container is zoomed, Drag does not sync with mouse cursor #2237

Offbeatmammal opened this issue Apr 16, 2024 · 4 comments

Comments

@Offbeatmammal
Copy link

Offbeatmammal commented Apr 16, 2024

see https://stackoverflow.com/questions/8605439/jquery-draggable-div-with-zoom/8605589#8605589 for specific issue and example along with a workaround

if a container has (eg) $('#container').animate({ 'zoom': currentZoom += .1}, 'fast'); applied to it, any draggable objects in the container will still move but not correctly sync'ed to the cursor position.

I suspect related, but containment also doesn't work (constrains to the original object size, not the zoomed object)

@mgol
Copy link
Member

mgol commented Apr 19, 2024

Thanks for the report. Does the issue you describe exist when jQuery UI 1.12.1 is used or only with jQuery UI 1.13.0 or newer?

@Offbeatmammal
Copy link
Author

did a quick test and seems to be the same behaviour with 1.12.1 and 1.13.1

@mgol
Copy link
Member

mgol commented Apr 22, 2024

Thanks for the report. Since the issue is already in 1.12, given limited team resources it's not likely to be fixed by the UI team; see the project status at https://blog.jqueryui.com/2021/10/jquery-maintainers-update-and-transition-jquery-ui-as-part-of-overall-modernization-efforts/. PRs are welcome if they're not too complex and contain tests.

@mgol
Copy link
Member

mgol commented Apr 22, 2024

A test case on JS Bin or similar would also be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants