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

Dragging an element directly after using .hideHandles() / .showHandles() #117

Open
dhardtke opened this Issue Mar 16, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@dhardtke

dhardtke commented Mar 16, 2014

Hi,

I know that this is not directly related to the plugin, but I don't know if I can solve this problem I have without people that know this plugin.

So I have a "mousedown", "mousemove" and "mouseup" listener listening on the svg html element (the paper in fact).

I have all the freeTransform handlers hidden at first and enable them, if an element gets selected within a mousedown handler.

Now I want to let the user immediately drag an element after he selected it. How can I do that? I tried almost everything, but nothing is working.

I can not get it working that I let FreeTransform do it's drag magic right before I've shown the handles, right now I always have to release the left mouse button before I can drag an element.

Any idea?

Thanks a lot!

@jwarren1980

This comment has been minimized.

Show comment
Hide comment
@jwarren1980

jwarren1980 Aug 13, 2014

When you hide the handles on the freeTransform elements for the first time, hide them with the undrag option set to false. This tells freeTransform that you want to remove the handles on the item, but still want it to respond to any drag events.

var ft = paper.freeTransform(rect);

ft.hideHandles({ undrag: false });

jwarren1980 commented Aug 13, 2014

When you hide the handles on the freeTransform elements for the first time, hide them with the undrag option set to false. This tells freeTransform that you want to remove the handles on the item, but still want it to respond to any drag events.

var ft = paper.freeTransform(rect);

ft.hideHandles({ undrag: false });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment