Search code examples
javascriptvue.jsvuedraggable

How to keep dragging item at former position until release in vue draggable


I'm implementing a nested layers component in vue with vuedraggable. I try to keep it close to Adobe's layers panel (for example in Illustrator).

The desired behaviour is: While dragging an item, it remains at it's position and only a black line is indicating where the item would be inserted after releasing the drag.

The black line could be realised by styling vue draggable's ghost. But how can I prevent the item from being removed from its original position while dragging?

Adobe Illustrator layers example


Solution

  • So I ended up using sl-vue-tree which does basically everything I need to simulate Adobe Illustrators layer panel.