-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
How to detect target object on drag drop operation on image with zoom and scrolled canvas? #2416
Comments
Please provide a jsfiddle with this setup |
Thank you Andrea, Please refer the jsfiddle: |
Please let me understand better. |
Yes, I have draged image from out side the canvas and drop the image on canvas image. And to replace the canvas image by the dragged image trying to detect canvas image object on drop event using mouse pointer. |
if you can click the image it means that findTarget is working good. |
Without zoom and scroll of the page operations, on the drop event findTarget working fine. But before performing drag drop operation if we perform
(Sorry dear as currently I am replying from mobile... I am not on development environment at this time. I am unable to share the reference code at this time. |
Please refer with drag drop operation: |
Look there is some strange interaction between viewportzoom and calcOffset with scrolling. Anyway in fiddle i changed just this:
https://jsfiddle.net/w72pxr6d/3/embedded/result/ |
I was also in same impression that IFRAME is the problem. so i had tried it in single page app. However, facing the same problem. |
As on canvas there are some images added. Let say image a, b and c at different position. If Zoom in the canvas and due to overflow scroll it and after that when I try to drag drop an library image -x on the canvas image -a, then by using 'findTarget' unable to get the target image-a on canvas.
var target = canvas.findTarget(event.e);
Facing the problem with zoom + scroll combination.
Thanks for any help!
The text was updated successfully, but these errors were encountered: