Open praneybehl opened 10 years ago
Here is an example of what I am trying to same: http://jsfiddle.net/praneybehl/dg3mQ/1/
I put together a quick and dirty workaround that issue. You can see it here: https://github.com/Rene8888/jquery-free-transform Unfortunately webmatrix did some code formatting and now you can't really see what I did. But here is a small explanation: whereever we get the coordinates of the mouse from the event, I divide them by the parent zoom. Like in your fix for jquery ui draggables. I somehow got a method working to set the parent zoom, but this is unfortunately done globally - I am not an javascript expert. I hope it helps you and I would be pleased if someone could tell me how to set the zoom for one element only and not globally...
I am trying to use this along with the jQuery Pan Zoom plugin. If the parent div is at a zoom other than 1 this free transform plugin doesn't perform as expected.
I got the same issue when using jQueryUI draggable with zoom but to fix it I used :
$(".selector").draggable({ drag: function(evt,ui) { var zoom = currentZoom; // current zoom value;
How can I fix it with this plugin? Can someone please help?
Thanks in Advance, Praney