cesco Posted October 22, 2021 Share Posted October 22, 2021 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 More sharing options...
GreenSock Posted October 23, 2021 Share Posted October 23, 2021 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 More sharing options...
cesco Posted October 23, 2021 Author Share Posted October 23, 2021 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 More sharing options...
cesco Posted October 23, 2021 Author Share Posted October 23, 2021 ok i realize now that i use old version of Draggable . With 3.8.0 problem is solved ☺️ Sorry!! Thanks 3 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now