GivenCoordinatesStage changes node locations and sizes as well as edge paths to user-specified values before invoking the core layout algorithm.
Remarks
Use IDataProvider-key NODE_LOCATION_DP_KEY to specify the locations (top-left coordinate) of nodes, IDataProvider-key NODE_SIZE_DP_KEY to specify the size of nodes and IDataProvider-key EDGE_PATH_DP_KEY to specify the path of edges (i.e. the port locations and the bends of edges).
A possible application for this stage are animated incremental layouts where the position of non-incremental elements should be changed/restored without affecting the start position of theses elements in the animation. Therefore, this stage could also be used together with PlaceNodesAtBarycenterStage.
Type Details
- yfiles module
- layout-core
- yfiles-umd modules
- All layout modules, view-layout-bridge
- Legacy UMD name
- yfiles.layout.GivenCoordinatesStage
See Also
Constructors
Creates a new GivenCoordinatesStage instance using the given core layout algorithm.
Parameters
A map of options to pass to the method.
- coreLayout - ILayoutAlgorithm
- the core layout algorithm
Properties
Gets or sets the core layout algorithm that is wrapped by this stage.
Methods
Changes node locations and edge paths to user-specified values and then invokes 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
See Also
Defined in
Constants
A data provider key for specifying the initial path of edges.
Remarks
Each edge can be mapped to an instance of YPointPath. Before calling the core layout algorithm, this stage sets the path of each edge to the associated YPointPath. The path must contain the source port location, followed by the bends (if any), followed by the target port location.
If an empty path is specified, the current path will be reset: all bends are cleared and the current source/target port locations are kept. The path of edges without associated value isn't changed by this stage (but may be changed by the core layout algorithm).
Domain | Edge | the edges of the input graph |
Values | YPointPath | the path of the edge |
A data provider key for specifying the initial location of nodes.
Remarks
Domain | YNode | the nodes of the input graph |
Values | YPoint | the top-left coordinate of the node |
A data provider key for specifying the size of nodes.
Remarks
Domain | YNode | the nodes of the input graph |
Values | YDimension | the size of the node |