Core.RenderTreeNode Class
Defined in:
samsara/core/nodes/RenderTreeNode.js:14
A node in the render tree. As such, it wraps a layout or size node,
providing them with an add
method. By adding nodes, the render tree
is constructed, the leaves of which are Surfaces
.
Constructor
Core.RenderTreeNode
(
private
-
object
Parameters:
-
object
Object | SizeNode | LayoutNode | Surface | View
Methods
add
(
RenderTreeNode
chainable
-
node
Extends the render tree with a new node. Similar to how a tree data structure is created, but instead of a node with an array of children, children subscribe to notifications from the parent.
Nodes can be instances of LayoutNode
, SizeNode
, or Object literals with
size and layout properties, in which case, appropriate nodes will be created.
This method also takes Views
(subtrees) and Surfaces
(leaves).
Returns:
RenderTreeNode:
remove
()
Remove the node from the Render Tree