Function(treeId, treeNode)setting.callback.beforeRightClick

Overview[ depends on jquery.ztree.core js ]

Used to capture the right click event before the 'onRightClick' callback, zTree based on return value to determine whether to trigger the 'onRightClick' 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 mouse right clicked

If the DOM which mouse right clicked isn't a node, it will return null.

ReturnBoolean

return true or false

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

Examples of setting & function

1. disable to trigger the 'onRightClick' callback

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