Type Details
- yfiles module
- layout-core
- yfiles-umd modules
- All layout modules, view-layout-bridge
- Legacy UMD name
- yfiles.partial.ClearAreaStrategy
See Also
Constants
A strategy that clears the area by globally partitioning the input into two parts and moving them apart.
Remarks
The existing layout is divided into two partitions somewhere along the area. The division can be vertical or horizontal. To free up the space, the two components are then moved horizontally (vertical division) or vertically (horizontal division). Edges connecting nodes of different partitions are rerouted by the routing algorithm.
This strategy has a rather global effect on the existing layout because every element is displaced. The edge routes and relative locations between elements that are in the same partition are not changed at all. Compared to other strategies, more unnecessary free space may be generated as not only the exact area is cleared, but a whole vertical or horizontal stripe.
The specified component assignments is considered such that if possible all component nodes are in the same partition.
See Also
Sample Graphs
A strategy that clears the area by trying to minimize the number of moved nodes, changing the layout rather locally.
Remarks
From the specified area, stripes running from the area border to the graph border in all four directions are considered. The area is now cleared by simply moving all elements inside the stripe in that direction, as far as necessary. If elements are not completely inside the stripe but collide with moved elements, then they are moved along too. This way, the moving stripe can quickly grow in some scenarios.
All edges where at least one node was moved are finally rerouted by the routing algorithm. This also applies for edges that cross the area if property considerEdges is enabled.
See Also
Sample Graphs
A strategy that clears the area by trying to minimize the number of moved nodes, changing the layout rather locally but moving all necessary nodes by a uniform offset.
Remarks
See Also
Sample Graphs
A strategy that clears the area with the goal to preserve the shape of the existing edge paths, moving related elements in common.
Remarks
Preserving the shapes of the edge paths means that the direction of the edge segments is not changed and no new bends are created. The segment lengths may change in order to generate free space. The effect of this strategy is that the relative routes remain the same. The general aesthetics of a given layout are, ideally, preserved. The layout only becomes sparser to free up the desired space.
This strategy models all graph elements (nodes, edges, bends, labels) the same way and unifies related elements where appropriate. They are then moved in common in order to keep the relation among them as is.
See Also
Sample Graphs
A strategy that clears the area with the goal to preserve the shape of the existing edge paths, moving related elements in common and also moving all elements by a uniform offset.
Remarks
In addition to the related strategy PRESERVE_SHAPES, this one uses a uniform offset for all elements that are moved. This way the relative locations between all elements in the graph are preserved. On the other hand, unnecessary additional space may be generated.
Preserving the shapes of the edge paths means that the direction of the edge segments is not changed and no new bends are created. The segment lengths may change in order to generate free space. The effect of this strategy is that the relative routes remain the same. The general aesthetics of a given layout are, ideally, preserved. The layout only becomes sparser to free up the desired space.
This strategy models all graph elements (nodes, edges, bends, labels) the same way and unifies related elements where appropriate. They are then moved in common in order to keep the relation among them as is.
See Also
Sample Graphs
Static Methods
Converts the argument to ClearAreaStrategy.
Parameters
A map of options to pass to the method.
- value - ClearAreaStrategy
- The value to convert to ClearAreaStrategy.
Returns
- ↪ClearAreaStrategy
- Either
value
if it is already a ClearAreaStrategy or an appropriate converted value.