The I13nNode
class used to create an I13nTree
. You will need this if you are implementing a plugin.
parentNode
- parent nodemodel
- custom model valuesisLeafNode
- indicate if it's a link nodeisViewportEnabled
- indicate if viewport check enable
Append an i13n node.
Get the children nodes array.
Get the custom value.
Get the DOMNode set by setDOMNode
.
Get the model data which is traversed and combined to the root.
Get the i13nModel data of this i13n node.
Get the position of its parent.
Get the inner text value of DOMNode related to this i13n node set by setDOMNode
. You can pass a DOMObject, getText will try to get target's text first then fallback to the related DOMObject, it's used for some case like click event, you want to get the text of real click target, instead of the DOMObject that we hook the click event.
Get if the i13nNode is in the viewport, if you don'y enable the viewport checking, it will always return true.
Get the flag indicates if the node is a leaf node.
If the children nodes are already sorted, we will mark this flag as false, which means next time when we try to execute the action related to the order, e.g., getPosition()
, we don't need to sort them again. This flag will be set as true if it has any child appended or removed.
Remove the i13n node.
Set the custom attribute you want, it used for some cases if you want to record some status, e.g., already traversed and you don't want to do the action again.
Set the DOMObject related to this I13Node.
Sort the children nodes, this will automatically executed when you try to getPosition
, which means for most case you will not need to do this manaully.
Will traverse the all the children under this node and execute the handler function passing with the child node.