marceljuenemann / angular-drag-and-drop-lists

Angular directives for sorting nested lists using the HTML5 Drag & Drop API
MIT License
2.16k stars 713 forks source link

do not start drag if dnd-nodrag && no dnd-handle #432

Open adrum opened 7 years ago

adrum commented 7 years ago

Fixes #404

benxshen commented 6 years ago

I have a small question: what's the difference by returning true/false on dragstart event?

line 98 if (element.attr('draggable') == 'false') return true; returns true; while your patch if (element.attr('dnd-nodrag') !== undefined && !event._dndHandle) return false; returns false

adrum commented 6 years ago

I think my instincts told me to return false if the drag did not succeed. I'm not entirely sure what the difference is or what the return value is used for. I can change it to true if that's the correct value to return.

sneakyfildy commented 6 years ago

Anyone knows good alternative? This entire tool looks dismantled and overall broken/

What's with pull request?

PaulDMendoza commented 6 years ago

Great fix. This really needs to be merged into the main branch. It fixed an issue I had where clicking on a drag handle quickly a couple times would cause a couple classes to remain on the element like dndDraggingSource after the click was complete.