Jump to content
Search Community

Draggable + Jquery ui selectable

cesco test
Moderator Tag

Recommended Posts

Hi, i have some elements that i must drag on stage. I need to move multiple elements at same time, so i use Jquery ui selectable. When i select multiple elements i use "onDrag" events and copy transform translate3d css on all selected elements.

I use Draggable.create inside "stop" event of Selectable.

 

Everything works fine, but if i deselect and reselect same elements, the elements when i copy transform css, return to transform translate 0px 0px 0px.

 

I try to kill or disable draggable after unselect elements but nothing change. Is it possible to reset draggable or destroy it ?

 

Thanks

 

Francesco

 

Link to comment
Share on other sites

Thanks for the answer @GreenSock.

This is the demo:

 

See the Pen bGrgELJ by cescocesco (@cescocesco) on CodePen

 

If you select multiple circle by click one and drag, release mouse button, wait 2 second, drag and move multiple element. When you have done, right click on stage. After this reselect that circles, wait 2 seconds, and see some of this return to original position.

 

Thanks for help.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...