FixPortLocationStage ensures that layout algorithms that cannot handle port constraints keep the ports of edges with strong PortConstraints.
Remarks
Without this stage, the port locations get lost.
For each edge with strong PortConstraints, this stage simply stores the original port and restores it after applying the core layout algorithm. Therefore, it either replaces the source/target port by the original port or adds the original port to the edge path calculated by the core layout algorithm (see method keepCalculatedPorts).
Default Values of Properties
coreLayout | null | |
keepCalculatedPorts | true | The edge paths contain the port locations calculated by the core layout algorithm. |
Type Details
- yfiles module
- layout-core
- yfiles-umd modules
- All layout modules, view-layout-bridge
- Legacy UMD name
- yfiles.layout.FixPortLocationStage
See Also
Constructors
Creates a new FixPortLocationStage with an optional core layout algorithm.
Parameters
A map of options to pass to the method.
- coreLayout - ILayoutAlgorithm
- The core layout algorithm.
- keepCalculatedPorts - boolean
Whether or not the final edge routes should contain the ports calculated by the core layout algorithm. This option sets the keepCalculatedPorts property on the created object.
Properties
Gets or sets the core layout algorithm that is wrapped by this stage.
Gets or sets whether or not the final edge routes should contain the ports calculated by the core layout algorithm.
Remarks
Default Value
true
.The edge paths contain the port locations calculated by the core layout algorithm.
See Also
Sample Graphs
Methods
Restores the locations of strong PortConstraints after invoking the core layout algorithm.
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
See Also
Implements
Invokes the layout process of the core layout algorithm.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph