Closed bortexz closed 1 year ago
All you need is "ng-drag-enter" and "ng-drag-leave". But they are still waiting to be pulled from Add ng-drag-enter and ng-drag-leave attributes and events #141. Since it's been awhile when this pull request was created (Apr 21, 2015) I'd suggest to change your "ngDraggable.js" file by yourself with improvements from this commit and play with that. Now you don't need "ng-drag-move", just use "ng-drag-enter" with $index parameter and you'll always know what drop zone you are entering.
You could find the modified "ngDraggable.js" at my repo here.
And you could see how it works on a real example here.
Fully working example + modified "ngDraggable.js" on both desktop/mobile platforms.
Hi!
I've been trying this library, and I have a little problem with this question.
What I want to achieve is reordering, BUT i want to make the reorder before you need to drop (So listening to ng-drag-move). I have the elements as the same drop zones. I've also tried to have the draggable element as a child of the drop zone.
My problem is, ng-drag-move fires for all of the drop-zones, instead of the one where the object is moving over. Is there a bug or the expected behaviour? If it's the last, then how you would achieve what a want to do? Is it possible with this library?
Thanks for help!