Skip to content

Releases: sparklinlabs/dnd-tree-view

v3.0.0: Improved drag'n'drop!

21 Jan 04:53
Compare
Choose a tag to compare

This release adds support for handling external stuff (links, files, etc.) being dropped into the tree view through dropCallback and setting metadata when dragging starts from inside the tree view via dragStartCallback.

The text/plain data of the drag operation is not longer set from the dndText dataset property. Instead, you can use event.dataTransfer.setData("text/plain", ...) yourself in dragStartCallback to setup whatever drag metadata you want. See the live demo for an example, along with its source code.

Finally, when dropping a series of nodes onto a group, they will now be added at the end of its children rather than at the beginning.