This class calculates bend points for self-loops routed in orthogonal or octilinear fashion.
Remarks
Type Details
- yfiles module
- layout-hierarchic
- yfiles-umd modules
- layout-familytree, layout-hierarchic, layout-radial, layout
- Legacy UMD name
- yfiles.hierarchic.SelfLoopCalculator
Constructors
Creates a new instance of SelfLoopCalculator using the given parameters.
Parameters
A map of options to pass to the method.
- minFirstSegmentLength - number
- the minimum length of the first and last segment of an orthogonally routed self-loop
- minEdgeDistance - number
- the minimum distance between a pair of self-loops
Methods
Calculates all self-loops at the given node of the given input graph.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
- node - YNode
- the node whose self-loops will be routed
- spc - IDataProvider
- the IDataProvider that returns the PortConstraint object associated with the source ports of the edges
Domain Edge Values PortConstraint the port constraint for the source port of each edge or null
if no port constraint exists - tpc - IDataProvider
- the IDataProvider that returns the PortConstraint object associated with the target ports of the edges
Domain Edge Values PortConstraint the port constraint for the target port of each edge or null
if no port constraint exists
calculateSelfLoops
(graph: LayoutGraph, node: YNode, selfLoops: YList, spc: IDataProvider, tpc: IDataProvider)Convenience method that calculates a list of self-loops that belong to a given node.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
- node - YNode
- the node whose self-loops will be routed
- selfLoops - YList
- a list of Edges that will be routed
- spc - IDataProvider
- the IDataProvider that returns the PortConstraint object associated with the source ports of the edges
Domain Edge Values PortConstraint the port constraint for the source port of each edge or null
if no port constraint exists - tpc - IDataProvider
- the IDataProvider that returns the PortConstraint object associated with the target ports of the edges
Domain Edge Values PortConstraint the port constraint for the target port of each edge or null
if no port constraint exists
Returns the minimum length between two edges associated with the given edge.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
- edge - Edge
- the given edge
Returns
- ↪number
- the minimum length between two edges
Returns the minimum length of the first segment of the given edge.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
- edge - Edge
- the given edge
Returns
- ↪number
- the minimum length of the first segment of an edge
Returns the minimum length of the last segment of the given edge.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
- edge - Edge
- the given edge
Returns
- ↪number
- the minimum length of the last segment of the given edge
Returns the minimum distance between two nodes associated with the given node.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
- node - YNode
- the given node
Returns
- ↪number
- the minimum distance between two nodes
Returns the minimum octilinear segment length of the given edge.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
- edge - Edge
- the given edge
Returns
- ↪number
- the minimum octilinear segment length of the given edge
Returns whether or not the given edge is octilinear.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
- edge - Edge
- the given edge
Returns
- ↪boolean
true
if the edge is octilinear,false
otherwise
Constants
A data provider key for specifying the minimum distance to the next edge or node side.
Domain | Edge | |
Values | number | a double value for each edge that specifies the minimum distance to the next edge or node side |
See Also
A data provider key for specifying the minimum length of the first segment of each edge.
Domain | Edge | |
Values | number | a double value for each edge that specifies the minimum length of its first segment |
See Also
A data provider key for specifying the minimum length of the last segment of each edge.
Domain | Edge | |
Values | number | a double value for each edge that specifies the minimum length of its last segment |
See Also
A data provider key for defining for each node a minimum distance to the self-loop edges.
Domain | YNode | |
Values | number | a double value for each node that specifies the minimum distance to the self-loop edges |
See Also
A data provider key for specifying the minimum length of the octilinear segments of an octilinear edge.
Domain | Edge | |
Values | number | a double value for each octilinear edge that specifies the minimum length of its octilinear segments |
See Also
A data provider key for specifying whether or not an edge is octilinear.
Domain | Edge | |
Values | boolean | a boolean value for each node that specifies whether or not the edge is routed in an octilinear fashion |