Function(treeId, treeNode)setting.callback.beforeDblClick

Overview[ depends on jquery.ztree.core js ]

Used to capture the dblclick event before the 'onDblClick' callback, zTree based on return value to determine whether to trigger the 'onDblClick' callback.

Default: null

Function Parameter Descriptions

treeIdString

zTree unique identifier: treeId, easy for users to control.

treeNodeJSON

JSON data object of the node which is double clicked

If the DOM which dblclicked isn't a node, it will return null.

Return Boolean

return true or false

If return false, ztree will not trigger the 'onDblClick' callback, no effect on other operations.

This callback function does not affect the dblclick the parent node to auto expand, please refer to setting.view.dblClickExpand properties.

Examples of setting & function

1. disable to trigger the 'onDblClick' callback

function zTreeBeforeDblClick(treeId, treeNode) {
    return false;
};
var setting = {
	callback: {
		beforeDblClick: zTreeBeforeDblClick
	}
};
......