A RootNodeAlignment describes how a local root node is arranged in relation to its children.
Remarks
Type Details
- yfiles module
- layout-tree
- yfiles-umd modules
- layout-orthogonal-compact, layout-orthogonal, layout-tree, layout
- Legacy UMD name
- yfiles.tree.RootNodeAlignment
Methods
placeParentHorizontal
(rootShape: RotatedSubtreeShape, shapes: IList<Object>, shapeBounds: Rectangle2D, spacing: number)Moves the shape of the local root to a suitable position relative to the children's shapes.
Remarks
The movement should only be done on the x-axis (horizontally).
This method is called by RotatableNodePlacerBases when they place the subtrees.
Parameters
A map of options to pass to the method.
- rootShape - RotatedSubtreeShape
- the shape of the local root node that will be moved
- shapes - IList<Object>
- a list of rotated subtree shapes, representing the shapes of the child nodes
- shapeBounds - Rectangle2D
- accumulated bounds of the shapes of all child nodes
- spacing - number
- the spacing value that should be used
Constants
An array containing all supported RootNodeAlignments.
Horizontal RootNodeAlignment at the center of the subtrees.
Remarks
Horizontal alignment at the center of the children.
Remarks
Horizontal RootNodeAlignment left of the children.
Remarks
Horizontal RootNodeAlignment at the left side.
Remarks
Horizontal RootNodeAlignment at the median child node.
Remarks
Horizontal RootNodeAlignment at the right side.
Remarks
Horizontal RootNodeAlignment right of the children.
Remarks
Static Methods
Calculates the common bounds of the given subtree shapes.
Remarks
Parameters
A map of options to pass to the method.
- shapes - IList<Object>
- a list of rotated subtree shapes
Returns
- ↪Rectangle2D
- the rectangle describing the bounds containing all given shapes