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

Drag and drop now significantly faster with large lists #518

Closed ghobs91 closed 9 months ago

ghobs91 commented 9 months ago

It now uses an indicator line to show where dropped item will be inserted, similar to how the parts list currently does it.

Using this visual indicator (a border that's dynamically added to the node hovered over) is more performant than constantly inserting and removing a placeholder element into the DOM, and therefore triggering the list to re-sort as well.

https://github.com/marceljuenemann/angular-drag-and-drop-lists/assets/4033636/c331053b-653d-4f71-9d4d-9cf7b682b7bb

marceljuenemann commented 9 months ago

Hi! As AngularJS and this library have been in maintainence mode for years, I'm no longer making any new releases.

I'd be surprised if the placeholder is really a performance problem though, did you actually obseve jank? The visual change is obviously something you could just do with different CSS for the placeholder element. Also curious how you would handle dropping into an empty list without a placeholder element