Function
Initialize properties
If object properties ('node', 'title' and 'children') of array elements specified in 'nodes' property are not Wires, Wires are created from them as arguments, with 'parent' property set to this Wire instance.
Arguments to initialize properties nodes: An array containing objects for child Wires for node values
Function
A root array
Return an array of tree node values
This method iterates over an array specified to 'object' argument and calls getValue() method of 'node' Wires with each element of the array to get object(s) that represetns nodes. (If 'node' Wires are omitted, the array element is used for further processing.) Then, getValue() method of 'title' Wires are called to get title strings for nodes. (If 'title' Wires are omitted, the objects representing nodes are used as title strings.) And if an array of objects with 'node' and 'title' Wires is specified to 'children', it is used to gather child nodes and their title strings in the same way recursively. Finally, an array of the top-level node objects are retuned.
An array of tree node values
Array
Function
Not supported
Function
An array of objects containing child Wires
Initialize child Wires
If 'node' or 'title' properties of array elements specified in 'children' argument are not Wires, Wires are created from them as arguments, with 'parent' property set to this Wire instance. If an array element has 'children' property, this method is called recursively with it.
undefined
Function
An object
An object with child Wires
Return an array of tree node values
This method calls getValue() method of 'node' Wires with 'object' argument to get object(s) that represents nodes. (If 'node' Wires are omitted, 'object' is used for further processing.) Then, getValue() method of 'title' Wires are called to get title strings for nodes. (If 'title' Wires are omitted, the objects representing nodes are used as title strings.) And if an array of objects with 'node' and 'title' Wires is specified to 'children', it is used to gather child nodes and their title strings in the same way recursively. Finally, an array of node objects are returned.
Array
Object
Object