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

Added a new setting to dndList: dndInvadeMode #437

Open bitflower opened 7 years ago

bitflower commented 7 years ago

dndInvadeMode: Optional boolean expression. When set to true the positioning algorithm will swap the respective list item with the placeholder immediately when the mouse enters the list item (mouse x is between top/bottom or left/right depending on dnd-horizontal-list)

Background info: I have a horizontal list and wanted the items to "swap" immediately when entered. This is now possible. See video for example!

Hope you like it ;-) dndlists

bitflower commented 7 years ago

BTW: didn't minify (yet) as theres no build step?

POjark commented 5 years ago

When set to true the positioning algorithm will swap the respective list item with the placeholder immediately when the mouse enters the list item

Is this suppose to work for example with the "Demo: Simple Lists" -example? I don't see any difference except can not drop to end of the list.. It does not replace anything in the list, not while hovering nor at drop? How to make this work? <ul dnd-list="list" dnd-invade-mode="true" dnd-horizontal-list="true">