dragon
dragon copied to clipboard
Drag within on zoom/scale?
Hi, great plugin, thanks!
But how to set the draggable area if the draggable object is zoomed-in an its greater than the 'within'-element?
Example:
Showing an image in full-size within a box (same sizes), than zoom-in and drag it within the box, wich has the original sizes of the image. Is that possible?
I think the calculations on line 300+ (if (opts.within) {) have to be changed a little bit?
thanks in advance...
Hi @silversmurf, thanks for reporting this! This isn't a use case I've had yet, so I have not experienced this issue. Do you have a test case that to show the issue? Also, feel free to submit a Pull Request if you are able to find a solution.
Hi Jeremy, no I don't have a test case. I'm working on a Chrome App, where I need this feature. There is a "editor area" with objects/elements within. This "editor area" have to be zoomable and draggable within a parent area. But when I zoom in, the "editor area" can be dragged out of this box.
Editor window without zoom (centered by default):

Editor window with zoom dragged (how it is):

Editor window with zoom dragged (how it should be):

Ah, gotcha. I understand the issue, but I don't have the availability to fix it right now. I'm happy to work with you on integrating a Pull Request if you'd like to take a stab at it!