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

Mutable Drag Element? #515

Closed Serexx closed 6 years ago

Serexx commented 6 years ago

I often have occasion to drag say, an Icon, and have the resulting drop appear in the target as some other (say larger) object, or vice-versa, drag a larger object with the drop resulting in a smaller Icon representation of the dragged object.

So far I can't see any event hook that allows this - only way I can see to do it is to grab object references onDrop and then trigger another custom event that replaces the dropped element, which feels hind of hackish.

Is there a better way to do this?

Serexx commented 6 years ago

Figured this out, silly me!