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
objectObject | SizeNode | LayoutNode | Surface | View
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
SizeNode, or Object literals with
size and layout properties, in which case, appropriate nodes will be created.
This method also takes
Views (subtrees) and
nodeObject | SizeNode | LayoutNode | Surface | View
Defines the rules for composing layout specs: transform, align, origin and opacity. Transform is multiplied by the parent's transform (matrix multiplication). Align is a proportional offset relative to the parent size. Origin is a proportional offset relative to the current size. Opacity is multiplied by the parent's opacity.
The composed layout spec
Defines the rules for composing size specs (size, margin, proportions) into a new size.
A margin array reduces the parent size by an amount specified in pixels.
A proportions array scales the parent size by a provided ratio.
A size array [width, height] can take
undefined, or numeric values.
undefined takes the parent value
true takes the value defined by the DOM
numeric values override parent values
size Composed size