jquery-ui icon indicating copy to clipboard operation
jquery-ui copied to clipboard

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

Open Offbeatmammal opened this issue 1 year ago • 4 comments

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)

Offbeatmammal avatar Apr 16 '24 07:04 Offbeatmammal

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?

mgol avatar Apr 19 '24 11:04 mgol

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

Offbeatmammal avatar Apr 22 '24 05:04 Offbeatmammal

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 avatar Apr 22 '24 08:04 mgol

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

mgol avatar Apr 22 '24 08:04 mgol