This class is a default IHierarchicalLayoutPortAssigner implementation.
Remarks
Default Values of Properties
considerFixedPorts | true | Edges with strong/fixed ports are considered. |
defaultBorderToPortGapRatio | 0.5d | Ports are distributed along the side of the node. |
Type Details
- yFiles module
- algorithms
Constructors
Creates a new instance of HierarchicalLayoutPortAssigner with default settings.
Parameters
A map of options to pass to the method.
- considerFixedPorts - boolean
- Whether this IHierarchicalLayoutPortAssigner considers edges with fixed LayoutPortCandidates. This option sets the considerFixedPorts property on the created object.
- defaultBorderToPortGapRatio - number
- The default ratio of the border gap (distance between the outer ports and the node border) to the port gap (distance between adjacent ports). This option sets the defaultBorderToPortGapRatio property on the created object.
See Also
Properties
Gets or sets whether this IHierarchicalLayoutPortAssigner considers edges with fixed LayoutPortCandidates.
Remarks
Default Value
true
.Edges with strong/fixed ports are considered.
Property Value
true
if the port assigner takes edges with strong/fixed ports into account, false
otherwiseGets or sets the default ratio of the border gap (distance between the outer ports and the node border) to the port gap (distance between adjacent ports).
Remarks
The ratio should be at least 0
.
A value of 0.0d
results in ports being placed directly on the corner of the node (if there is more than one port).
A value of 0.5d
results in ports being distributed along the side of the node so that the distance between the corner of the node and the first port is half as wide as the distance between two adjacent ports.
A value of Double.POSITIVE_INFINITY
results in all ports being centered at the side in one point.
Default Value
0.5d
.Ports are distributed along the side of the node.
Property Value
Throws
- Exception({ name: 'ArgumentError' })
- if the given ratio is negative
See Also
Sample Graphs
Methods
Assigns source and target port coordinates to each edge of the graph.
Remarks
This method assigns:
This method is called by HierarchicalLayout after the sequencing phase.
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
- layoutContext - HierarchicalLayoutContext
- The HierarchicalLayoutContext containing context information about the nodes and edges of the graph, as well as the ItemFactory instance.