bevacqua / dragula

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

Prevent dragging to an area in dragula container? #696

Open WriterStat opened 2 years ago

WriterStat commented 2 years ago

Hi All! Thanks for a great kit! And all the hard work.

We have a lib we are using from a third party that in turn uses dragula like many do.

Is it possible... to prevent dragging to an area in a dragula container?

Example: We want to have label divs in our dragula container. It all works great! We prepend/put a label div in the dragula container and we are able to drag both above and below it.

But we'd like the top label div to always stay on top, not allow items to be dragged above it. Is there any way to pin to top? Disallow any dragging above an item/top item?

Note: Clicking these label divs above in our code hide the dragula items below them. Re-clicking them allows them to show.

Thanks! Any workarounds/thoughts appreciated. We need to use one container. so moving the label divs outside or using multiple container divs outside, won't work for us.

WriterStat commented 2 years ago

All thoughts appreciated, before we start doing crazy things. =)