Clone item on Drag #1977
scalarmapedia
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Our product uses RGL to manage a grid of widgets displayed in Dashboards. It would be great UX if we could toggle a cloneOnDrag={true} property on the grid, and set a callback cloneOnDragCallback, to handle the cloning. This has been a feature of 3dsmax (3D modeling app) to clone models, in its case, it's SHIFT move, to clone an item, it's very intuitive when used.
How would this work, in our case, we would set cloneOnDrag as TRUE when the user holds SHIFT key, and THEN drags. RGL would then call cloneOnDragCallback() passing the dragged item, layout etc as args. We would then take the item, Clone it in our code, generate a new ID for it, new Title etc, and pass it back.
During this clone/drag, the same placeholder would appear, BUT the item would stay where it is, whilst the CLONE we pass back would be shown dragging. On Drop, the Clones layout is set.
Why do we need this? In our Dashboards Cloning an item is via a menu, and then the user finds the Clone at the bottom of the dashboard, as there is nowhere else logical to place it. Then they move it to where they want it. Drag Clone, combines the Cloning AND the postioning workflow. Indeed you can chain drag clones, very quickly, just as in 3dsmax.
I have tried to achieve this using onDragStart, and updating the item's definition, to do the above. But RGL already has the dragged item in a buffer, and it just does not work. So it appears impossible using the lib as is...
Beta Was this translation helpful? Give feedback.
All reactions