A ITreeLayoutPortAssigner places the ports of edges connecting to the same node.
Inheritance Hierarchy
ITreeLayoutPortAssigner
Remarks
Classes implementing this interface are responsible for the assignment of the edges' ports. ISubtreePlacer instances need to obey the currently set ports.
Type Details
- yFiles module
- algorithms
While the specified ISubtreePlacer preserves the assigned ports, some implementations may not be able to generate the complex edge routes required, potentially leading to visually unappealing connections. As a result, custom ITreeLayoutPortAssigner implementations often also require custom ISubtreePlacer implementations.
Methods
Places the ports of edges connecting to the given node.
Remarks
This method is called by TreeLayout before the actual layout calculation takes place. It assigns both the single incoming edge's target port as well as all source ports of all outgoing child edges.
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
- node - LayoutNode
- the node whose adjacent edges' ports should be set
At the time this method gets invoked, TreeLayout may have reversed some edges in order to normalize the tree structure.