Function(treeId, treeNode)setting.callback.beforeDragOpen

Overview[ depends on jquery.ztree.exedit js ]

Callback executed before drag node to collapsed parent node, The return value controls the auto expand behaviour of the parent node.

Default: null

Function Parameter Descriptions

treeIdString

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

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 myBeforeDragOpen(treeId, treeNode) {
    return false;
};
var setting = {
	edit: {
		enable: true
	},
	callback: {
		beforeDragOpen: myBeforeDragOpen
	}
};
......