sharedlabs / sortable-list

A web component for reorderable drag-and-drop lists on modern browsers and touch devices.
MIT License
35 stars 21 forks source link

Added initial and new index of in sort-finish event #15

Closed vtellier closed 1 year ago

vtellier commented 6 years ago

In my application I needed to reflect the reordering in an array. I did the following to get the initial and new index so I can perform my splices on the sort-finish event.

This might interest you, feel free to merge or not :)