ngx-drag-drop
ngx-drag-drop copied to clipboard
Ref #17 - Add dndIndex to store the initial drag index of the dragged item
Related to #17
This stores the initial drag index in the dndState
and provides it on an extended DragEvent
during any of the link/move/copy/end emitters so a user can properly remove an item, such as in cases like primitives where an indexOf
would otherwise be insufficient.
I noticed an issue and it seems this isn't entirely correct. Once drop happens the array may have shifted all the elements and thus the original drag index would be incorrect. Need to rethink this a bit.