1

Is it possible to draw line between the container and a draggable element during dragging using 'dragula' lib? When the element is dropped, the line should disappear.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Serhiy
  • 1,893
  • 9
  • 30
  • 48

1 Answers1

2
<div [dragula]='"my-bag"'>
    <div class="draggable-item">
        <div class="my-drag-indicator">
            // style your line here
        </div>
        <div class="my-drag-content">
            // your content here
        </div>
    </div>
</div>

while dragging, you will have a clone image of your item, dragula will add 'gu-transit' class to it. As the structure above, you can style your .draggable-item.gu-transit to hide the '.my-drag-content' and show the 'my-drag-indicator'

ndh103
  • 96
  • 1
  • 6