Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
cesco

Draggable + Jquery ui selectable

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

Hi @cesco. I don't really understand what you're asking/describing - can you please provide a minimal demo? You can definitely disable() or kill() a Draggable instance if that's what you're asking. 

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

ok i realize now that i use old version of Draggable :(. With 3.8.0 problem is solved ☺️

Sorry!!

Thanks

  • Like 3
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.
×