Function(treeId, treeNode)setting.callback.beforeDragOpen

Overview[ depends on jquery.ztree.exedit js ]

Used to capture the event when drag node to collapsed parent node, zTree based on return value to determine whether to auto expand parent node.

Default: null

Function Parameter Descriptions

treeIdString

zTree unique identifier: treeId, the tree is what the treeNode(parent node) is belong to, easy for users to control.

treeNodeJSON

JSON data object of the parent node which will be auto expanded

Return Boolean

return true or false

If return false, zTree will not auto expand parent node.

Examples of setting & function

1. disable to auto expand parent node.

function zTreeBeforeDragOpen(treeId, treeNode) {
    return false;
};
var setting = {
	edit: {
		enable: true
	},
	callback: {
		beforeDragOpen: zTreeBeforeDragOpen
	}
};
......