SeriesParallelLayoutPortAssigner implements the default port assignment strategy for SeriesParallelLayout.
Implements
- I
Remarks
Ports are either placed at the CENTER or get DISTRIBUTED at the sides of the node.
If LayoutPortCandidates are specified, the fixed LayoutPortCandidates are handled separately and keep their initial location relative to the node while free LayoutPortCandidates just influence on which side of the node the port is placed.
If there are edge groups specified, the edges which belong to the same group get the same port locations.
Default Values of Properties
| Name | Default |
|---|---|
| borderToPortGapRatio | 0.5 |
| mode | SeriesParallelLayoutPortAssignmentMode.CENTER |
See Also
Developer's Guide
API
- LayoutPortCandidate, sourceGroupIds, targetGroupIds
Members
No filters for this type
Constructors
Creates a new SeriesParallelLayoutPortAssigner instance.
Creates a new SeriesParallelLayoutPortAssigner instance.
Parameters
- mode?: SeriesParallelLayoutPortAssignmentMode
- An optional port assignment mode. The default value is CENTER.
- ratio?: number
- The ratio of the distance between outer ports and the border to the distance between any two ports. The default value is
0.5.
Properties
The ratio must have a positive value. If the ratio is
0, the ports will be distributed along the whole side of the node without a gap between the last port and the corner.This setting only affects the DISTRIBUTED port assignment.
final
Property Value
the ratio of the border gap (gap between ports and border) to the port gap (gap between two ports)
Throws
- Exception ({ name: 'ArgumentError' })
- if the specified ratio is negative
Default Value
The default value is: 0.5
Sample Graphs
ShownSetting:
0.5Gets or sets the mode that describes how ports are placed.
Gets or sets the mode that describes how ports are placed.
conversionfinal
Property Value
one of the predefined port assignment modes
Default Value
The default value is: SeriesParallelLayoutPortAssignmentMode.CENTER
Methods
Places the ports of edges connecting to the given node according to the port assignment mode.
Places the ports of edges connecting to the given node according to the port assignment mode.
Parameters
- graph: LayoutGraph
- the input graph
- node: LayoutNode
- the node whose adjacent edges' ports should be placed
See Also
API
- mode