3 name: options-oncanselectnode
6 You can set a function to override if a node can be selected. The function gets a node as parameter, and must return true or false.
8 For this to work, the option 'selectable' must be 'true'.
11 // Example: nodes with children cannot be selected
15 onCanSelectNode: function(node) {
16 if (node.children.length == 0) {
17 // Nodes without children can be selected
21 // Nodes with children cannot be selected