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

Snap.svg and zpd conflict during Snap.svg drag #20

Open
jlgrall opened this issue Nov 29, 2014 · 8 comments
Open

Snap.svg and zpd conflict during Snap.svg drag #20

jlgrall opened this issue Nov 29, 2014 · 8 comments

Comments

@jlgrall
Copy link

jlgrall commented Nov 29, 2014

I want only some elements to be draggeable. So I use Snap.svg's element.drag(). But this conflicts with the drag and pan functions from zpd.

Here is a quick workaround which prevent zpd from seeing the mousedown event when the element is managed by Snap.svg dragging code:

// Prevent zpd during a Snap.svg drag:
eve.on("snap.drag.start", function(x, y, e) {
    e.stopPropagation();
});

Note: eve is Snap.svg's integrated event library.

@hueitan
Copy link
Owner

hueitan commented Dec 1, 2014

Thanks @jlgrall
But how?

@ghost
Copy link

ghost commented Jan 16, 2015

I do appreciate the code above.
Now, I have a concern and question on how to fix it.
I can now drag the elments, however, they don't keep up
with the mouse location. Is that normal? Is there a fix for that?

Thanks,
Kim H.

@ghost
Copy link

ghost commented Jan 16, 2015

Ok, I have learned a little more. The issue has to do with zooming out. The more you are zoomed out the worse the selected element move behind the mouse as you are moving it and it does not work well at all. so there is someplace that the mouse movement needs to take in to consideration the zoom level or something like that.

Thanks,
Kim H.

@hueitan
Copy link
Owner

hueitan commented Jan 17, 2015

Yup @khovorka This should be fixed!

@ghost
Copy link

ghost commented Jan 17, 2015

Huei90,
Do you mean the dragging of elements when zoomed out is fixed? If so is there a different download that is available as it does not work with what I currently have.
Kim H.

@hueitan
Copy link
Owner

hueitan commented Jan 17, 2015

"should be"

I haven't fixed it yet

@ghost
Copy link

ghost commented Jan 18, 2015

Huei90,

Ok, thanks for the clarification. Do you have a time frame as I could use this as soon as possible.

Kim H.

@hueitan
Copy link
Owner

hueitan commented Jan 19, 2015

@khovorka Unfortunately, I have no set time on this to fix. But I will fix ASAP.

Maybe you can trace code and help on fixing by PR?

Thanks 🍻

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

No branches or pull requests

2 participants