E

TreeLayoutPortAssignmentMode

Specifies the method of port assignment for edges in a tree layout.

Remarks

This enumeration determines how ports are assigned to edges relative to their nodes. The assignment mode affects how edge connections are positioned on the nodes.

Members

No filters for this type

Constants

A port assignment specifier which defines that all ports are placed at the center of the node or its border.

If no LayoutPortCandidates are defined for an edge, its port is placed at the center of the node.

If LayoutPortCandidates are defined for the edges handled in this mode, the port will be placed at the center of a valid side of the node.

static

Sample Graphs

ShownSetting: All edges end at the center of the node
A port assignment specifier which defines that edges are distributed evenly on the side of their nodes.

Port-grouped edges will use the same port coordinate and will be considered as a single edge when calculating the distribution. Port groups are specified using the TreeLayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel> property ports.

The side of the node on which the edges are distributed can be specified using port candidates. Otherwise, the side is chosen based on the layoutOrientation.

While ISubtreePlacer implementations preserve the assigned ports, some may not generate suitable edge routes when ports are distributed. For distributed ports, SingleLayerSubtreePlacer typically yields the best results.
static

Sample Graphs

ShownSetting: Edge ports are distributed on the side of the node

See Also

API
SOURCE_EDGE_GROUP_ID_DATA_KEY, TARGET_EDGE_GROUP_ID_DATA_KEY

Static Methods

Converts the given argument to an enum constant of this enum type.
Most notably, this method can convert an enum constant's name into the enum constant itself.
static

Parameters

value: TreeLayoutPortAssignmentMode
The value to convert to an enum constant.

Return Value

TreeLayoutPortAssignmentMode
The enum constant that corresponds to the given argument.
Returns the name of the given enum constant.
static

Parameters

value: TreeLayoutPortAssignmentMode
The numeric value of an enum constant.

Return Value

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.