Specifies different strategies for assigning ports to nodes in a HierarchicalLayout.
Remarks
This enumeration defines how ports are allocated to nodes, which affects how edges connect to nodes. The chosen strategy can influence the visual clarity and organization of the layout.
Type Details
- yFiles module
- algorithms
Constants
A port assignment strategy that distributes ports evenly along the border of the node.
A port assignment strategy that places all edges on grid lines.
Remarks
If there are not enough grid lines for each port, ports may overlap. In case there is no grid line available at the side of a node, the ports are placed centered at that side.
See Also
Sample Graphs
This port assignment can only be used if the gridSpacing is greater than
0
.A port assignment strategy that places all edges on grid lines or sub-grid lines.
Remarks
If there are not enough grid lines for each port, the grid gets subdivided with sub-grid lines until each edge has space for its port.
See Also
Sample Graphs
This port assignment can only be used if the gridSpacing is greater than
0
.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 - HierarchicalLayoutPortAssignmentMode
- The value to convert to an enum constant.
Returns
- ↪HierarchicalLayoutPortAssignmentMode
- 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 - HierarchicalLayoutPortAssignmentMode
- 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.