Used to capture the drop event when drag-drop node.
If you set 'setting.callback.beforeDrop',and return false, zTree will restore the dragged nodes, and will not trigger the 'onDrop' callback.
Default: null
event Object
zTree unique identifier: treeId, the id of the containing tree.
A collection of the nodes which has been dragged
The treeNodes are the data of the nodes which be dragged, when move nodes.
The treeNodes are the clone data of the nodes which be dragged, when copy nodes.
JSON data object of the target node which treeNodes are drag-dropped.
If the treeNodes will be root node, the targetNode = null
the relative position of move to the target node
"inner": will be child of targetNode
"prev": will be sibling node, and be in front of targetNode
"next": will be sibling node, and be behind targetNode
If moveType is null, means drag & drop is cancel.
the flag used to judge copy node or move node
true: copy node; false: move node
function myOnDrop(event, treeId, treeNodes, targetNode, moveType) {
alert(treeNodes.length + "," + (targetNode ? (targetNode.tId + ", " + targetNode.name) : "isRoot" ));
};
var setting = {
callback: {
onDrop: myOnDrop
}
};
......