TreeController source
Properties
-
allExpanded source
-
Whether every node eligible for expansion is expanded.
This is a readable and writable property. Setting to true causes all nodes to be expanded.
-
childrenPath source
-
An FRB expression, that evaluated against content or any of its children, produces an array of that content's children. By default, this is simply "children", but for an alternate example, a binary tree would have children
[left, right]
, except that said tree would need to have no children if left and right were both null, so(left ?? []).concat(right ?? [])
, to avoid infinite recursion.This property must be set before
content
. -
constructor source
-
Creates a tree controller.
-
content source
-
The input of a tree controller, an object to serve at the root of the tree.
-
findNodeByContent source
-
Finds and returns the node having the given content. Takes an optional second argument to specify the compare function to use. note: If you are doing find operations frequently, it might be better to attach a binding that will facilitate incremental updates and O(1) lookups.
nodeForContent <- nodes{[content, this]}.toMap()
-
initiallyExpanded source
-
Whether nodes of the tree are initially expanded.
This property must be set before
content
. Ifcontent
has already set, useallExpanded
. -
iterations source
-
The product of a tree controller, an array of tree controller nodes corresponding to each branch of the content for which every parent node is
expanded
. -
Node :TreeControllerNode source
-
-
noneExpanded source
-
Whether any nodes are collapsed.
This is a readable and writable property. Setting to true causes all nodes to be collapsed.
-
postOrderWalk source
-
Performs a traversal of the tree, executes the callback function for each node. The callback is called after continuing the walk on its children.
-
preOrderWalk source
-
Performs a traversal of the tree, executes the callback function for each node. The callback is called before continuing the walk on its children.
-
root source
-
A by-product of the tree controller, the root node of the tree for the current content.
Generated from v0.14.14