Specifies the policies for placing the root node of a subtree within its bounds.
Remarks
The RootPlacementPolicy enum defines different strategies for positioning the root node in relation to its subtree, based on the orientation of the layout and the arrangement of child nodes.
Type Details
- yFiles module
- algorithms
Constants
Root placement policy for placing the root centered above or to the left of its subtree, depending on the actual LayoutOrientation and the ChildArrangementPolicy.
Remarks
If the children are arranged horizontally, the root is placed centered above its subtree with respect to the LayoutOrientation. If the children are arranged vertically, the root is placed centered to the left of its subtree with respect to the LayoutOrientation.
Sample Graphs
Root placement policy for placing the root of a subtree completely to the top left of its subtree with respect to the actual LayoutOrientation.
Remarks
The root is placed entirely above and to the right of the subtree with no horizontal or vertical overlaps.
Sample Graphs
Root placement policy for placing the root of a subtree in the upper left corner of the subtree bounds with respect to the actual LayoutOrientation.
Remarks
If the children are arranged horizontally, the root is placed entirely above its subtree, but children may be placed below the root node. If the children are arranged vertically, the root is placed entirely to the left of its subtree, but children may be placed to the right of the root node.
Sample Graphs
Static Methods
Converts the given argument to an enum constant of this enum type.
Remarks
Most notably, this method can convert an enum constant's name into the enum constant itself.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- value - RootPlacementPolicy
- The value to convert to an enum constant.
Returns
- ↪RootPlacementPolicy
- The enum constant that corresponds to the given argument.
Returns the name of the given enum constant.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- value - RootPlacementPolicy
- The numeric value of an enum constant.
Returns
- ↪string
- The name of the enum constant.
Throws
- Exception({ name: 'Error' })
- If this type is a flags enums, and the provided value doesn't correspond to a single enum constant, or if this enum type contains no constant of the given numeric value.