bevacqua / dragula

:ok_hand: Drag and drop so simple it hurts
https://bevacqua.github.io/dragula/
MIT License
21.89k stars 1.97k forks source link

Possibility to move an item without having it removed on drag start #627

Closed directcuteo closed 3 years ago

directcuteo commented 4 years ago

Hello!

I want to be able to drag an element from the list but without the default behaviour of ng2-dragula which is removing it on drag start.

I want the element to stay where it is until I drop it (because it is moving all the elements in the list if it is removed and it's baffling). I would like something like the copy function, where the element is not removed on drag start so basically on the drag time I will have the element in it's initial position and also attached to the mouse cursor.

One solution that I found is to create a new element, append it to the place drag started and in the end delete it on the drop event but it is just an ugly workaround when it should be a simple boolean dragula configuration.

Did someone faced this problem aswell and found a solution or could this be included as a future feature?

Thank you!

brandoncc commented 3 years ago

It sounds like what you want is to use the "copy" drag type. Hopefully you already found a solution, since this was almost a year ago, but this might be useful for others.

dcantatore commented 3 years ago

https://github.com/bevacqua/dragula#optionscopy