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

Overview[ depends on jquery.ztree.core js ]

Set to show or hide node icon.

Default: true

Boolean Format

true means: show node icon.

false means: hide node icon.

Function Parameter Descriptions

treeIdString

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

treeNodeJSON

JSON data object of the node which need to show icon.

Return Boolean

Return value is same as 'Boolean Format'

Examples of setting & function

1. Hide node icon

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

2. Hide node icon which level=2

function showIconForTree(treeId, treeNode) {
	return treeNode.level != 2;
};
var setting = {
	view: {
		showIcon: showIconForTree
	}
};
......