react-draggable
react-draggable copied to clipboard
Drag multiple objects at once
Hi, Is it possible to drag multiple draggable instances at once? I’m using draggable to manipulate geometric shapes. The objects are in different positions in DOM model, so I can not wrap them in one <Draggable>..</Draggable> instance.
Here is an example of what I want to achieve:
When I drag the rectangle, rounded square or triangle, all 3 should move at the same time.
I have to maintain the order in which the objects overlap while dragging (so I can't wrap all of them into one element).
It would be great to have some sort of draggableGroup
attribute to assign to different draggable components. Or some way to exchange information between different draggable elements.
I know such a possibility exists in react-dnd, but it's a much complicated framework to use for me.