HTML5 tree view widget
npm install dnd-tree-viewTreeView.js in your page.
treeView = new TreeView(container).
), put whatever you want inside.
treeView.append(listItem, type, optionalParent) or treeView.insertBefore(listItem, type, referenceListItem) with type one of 'item' or 'group'.
TreeView constructor takes an optional second options parameter. It supports the following keys:
dragStartCallback and dropCallback for handling drag'n'drop operations.
multipleSelection is a boolean indicating whether to enable multiple item selection or not.
dragStartCallback is not null, then dragging elements will be enabled.
event.dataTransfer.setData(...) to setup drag'n'drop metadata.
dropCallback is not null, then dropping will be enabled.
https://github.com/sparklinlabs/dnd-tree-view and run npm install once
npm run build to build once or npm run watch to start a watcher that will rebuild when changes are detected