ReverseEdgesStage selectively reverses edges in a graph, while keeping the layout and label positions of the reversed edges as close to the pre-reversal layout and positions as possible.
Type Details
- yfiles module
- layout-core
- yfiles-umd modules
- All layout modules, view-layout-bridge
- Legacy UMD name
- yfiles.layout.ReverseEdgesStage
See Also
Constructors
Creates a new ReverseEdgesStage instance with an optional core layout algorithm.
Parameters
A map of options to pass to the method.
- coreLayouter - ILayoutAlgorithm
- The core layout algorithm.
See Also
Properties
Gets or sets the core layout algorithm that is wrapped by this stage.
Methods
Reverses all selected edges before calling the core layout algorithm and restores the original edge direction after the core layout algorithm has finished.
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
Reverses the specified edge in the specified graph.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the graph to which the specified edge belongs
- edge - Edge
- the edge to be reversed
See Also
Reverses selected edges in the specified graph.
Remarks
Selected edges are marked in a IDataProvider registered with AFFECTED_EDGES_DP_KEY.
Implementation detail: This method calls reverseEdge in order to reverse a selected edge.
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the graph in which to reverse edges.
See Also
Constants
A data provider key for selecting edges for reversal.
Domain | Edge | |
Values | boolean | true if the edge should be reversed, false otherwise |
Static Methods
Marks edges in a tree-structured graph component that need to be reversed to make the specified node the root of the tree component.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the graph to which the specified node belongs
- root - YNode
- the node to be considered the root of its tree component
- reversedEdges - IDataAcceptor
- a IDataAcceptor to mark edges for reversal
Domain Edge Values boolean true
if the edge needs to be reversed,false
otherwise
Throws
- Exception({ name: 'ArgumentError' })
- if the specified root node is
null
or does not belong to the specified graph