Function(event, treeId, treeNodes)setting.callback.onDrag

Overview[ depends on jquery.ztree.exedit js ]

Used to capture the drag event when drag node.

If you set 'setting.callback.beforeDrag',and return false, zTree will stop drag, and will not trigger the 'onDrag' callback.

Default: null

Function Parameter Descriptions

eventjs event Object

event Object

treeIdString

zTree unique identifier: treeId, the tree is what the treeNodes are belong to, easy for users to control.

treeNodesArray(JSON)

A collection of the nodes which will be dragged

Examples of setting & function

1. When drag nodes, alert the number of dragged nodes.

function zTreeOnDrag(event, treeId, treeNodes) {
    alert(treeNodes.length);
};
var setting = {
	callback: {
		onDrag: zTreeOnDrag
	}
};
......