Boolean / Function(treeId, treeNode)setting.view.dblClickExpand

Overview[ depends on jquery.ztree.core js ]

When double-click the parent node, 'dblClickExpand' is used to decide whether to expand the parent node.

Default: true

Boolean Format

true means: When double-click the parent node, zTree will expand the parent node.

false means: When double-click the parent node, zTree will not expand the parent node.

Function Pamameter Descriptions

treeIdString

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

treeNodeJSON

JSON data object of the node which be double-clicked.

Return Boolean

Return value is same as 'Boolean Format'

Example of setting

1. When double-click the parent node, zTree will not expand the parent node.

var setting = {
	view: {
		dblClickExpand: false
	}
};
......

2. When double-click the parent node, zTree will expand the parent node which level>0.

function dblClickExpand(treeId, treeNode) {
	return treeNode.level > 0;
};
var setting = {
	view: {
		dblClickExpand: dblClickExpand
	}
};
......