Closed Aterbonus closed 5 years ago
PR sended. This adds the ability to select which childs can or can't be dragged.
I didn't drop support for firstchilddrag
, so this feature is not a breaking change, but I wrote in the docs that the data attributes are the way to go.
Writing this I thought that we may need a way to tell which elements together with the elements inside them can be dragged or not. But that will be another PR ;)
Thanks 3c6a793
Currently the directive doesn't have a granular way to select which childrens can be dragged or not. To solve this issue I propose that the directive supports data attributes that indicates if a child element can be dragged or not.
Examples:
With this the
firstchilddrag
arg is not necessary.firstchilddrag
only supports one child, the first, and at the moment can cause unexpected behavior if the html is not minimized (element.firstChild
can give you a text node and if the html is not minimized firstChild can be a text node of spaces).This can support issue #23 and other use cases.
If the support for firstchilddrag is dropped this is a breaking change, so I open this issue for dicussion before opening a PR.
Thanks for this plugin :)