reppners / ngx-drag-drop

Angular directives using the native HTML Drag And Drop API
https://reppners.github.io/ngx-drag-drop/
BSD 3-Clause "New" or "Revised" License
299 stars 118 forks source link

Allow to disable drag on child elements #74

Open crushjz opened 4 years ago

crushjz commented 4 years ago

Allow to disable drag on child elements. Eg: I have an absolutely positioned element that is a child of the element with the dndDraggable directive. I want to disallow the drag on that element, but keep the draggability to his container.

The native draggable="false" should work out of the box.

reppners commented 2 years ago

I don't know if I agree with the idea of draggable="false" disabling the draggability of a parent element since there is a difference in semantic to "independent" draggable attributes which could be breaking other use cases.

Introducing an directive for child elements that disables the drag on a parent, maybe by even using template reference variables as input to the directive to avoid guesswork is definitely an idea I support.