A ILayoutStage that temporarily removes all nodes and edges with NaN
-coordinates.
Remarks
This layout stage
may be necessary when a ILayoutAlgorithm takes the initial coordinates into account. In this case initial coordinates containing NaN
-values, can cause exceptions or strange results.
Layouter
s that consider initial coordinates:
- HierarchicLayout in incremental mode
- OrthogonalLayout with activated from sketch drawing
- OrganicLayout for a subset of nodes
- TreeLayout, ClassicTreeLayout when using a from-sketch comparator.
- BalloonLayout in incremental mode
- PartialLayout
- all edge routing algorithms: EdgeRouter, ChannelEdgeRouter, BusRouter, OrganicEdgeRouter
Since this stage only hides the invalid graph elements and doesn't apply any new coordinates, it is not defined where those nodes and edges will be placed within the calculated layout.
Type Details
- yfiles module
- layout-core
- yfiles-umd modules
- All layout modules, view-layout-bridge
- Legacy UMD name
- yfiles.layout.HandleNaNCoordinatesStage
Properties
Gets or sets the core layout algorithm that is wrapped by this stage.
Methods
Hides all graph elements with NaN
-coordinates during core layout and restores them afterwards.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- graph - LayoutGraph
- the graph.
See Also
Migrating from Synchronous to Asynchronous Layout Calculation,
Using Buffered Layout,
Writing a Custom Layout Stage
Implements
Invokes the layout process of the core layout algorithm.
Remarks
Overriding classes may call this method during applyLayout to delegate arranging the graph to the core layout algorithm. They can add pre- and post-processing code before and after this call.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph