A SubtreeShape represents the position and the borders of a subtree.
Remarks
ISubtreePlacers will move SubtreeShapes and use the borders to calculate distances between the subtrees. When two subtrees are placed in relation to their common root, their SubtreeShapes are merged to represent the new subtree.
The borders on each side of the SubtreeShape are modeled with BorderLines. The resulting area includes the borders of each node and edge in the corresponding subtree. It can also contain the bounds of labels belonging to those nodes and edges.
The SubtreeShape also describes a connector defining the location to which the edge from its parent is attached. It is possible to add some bends (target points) at the end of this edge and include them in the SubtreeShape. During layout calculation, the last target point is the connection point for the edge.
This class cannot be instantiated
Type Details
- yFiles module
- algorithms
See Also
Properties
Gets the current bounds of this SubtreeShape instance.
Property Value
Gets the current x-coordinate of the connection point to which the layout algorithm connects the ingoing edge.
Remarks
Property Value
See Also
Gets the current y-coordinate of the connection point to which the layout algorithm connects the ingoing edge.
Remarks
Property Value
See Also
Gets the bounds of the NodeLayout of the root node of this SubtreeShape instance.
Property Value
Gets the current maximum x-coordinate of this SubtreeShape instance.
Property Value
Gets the current maximum y-coordinate of this SubtreeShape instance.
Property Value
Gets the current minimum x-coordinate of this SubtreeShape instance.
Property Value
Gets the current minimum y-coordinate of this SubtreeShape instance.
Property Value
Gets the current x-coordinate of the origin of this SubtreeShape instance.
Remarks
Property Value
Gets the current y-coordinate of the origin of this SubtreeShape instance.
Remarks
Property Value
Methods
Extends this SubtreeShape instance by the given rectangle.
Remarks
Parameters
A map of options to pass to the method.
- bounds - Rect
- the bounds that should be added to the shape
See Also
Adds all edge segments of the given edge to this SubtreeShape instance.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
- edge - LayoutEdge
- the given edge
See Also
Extends this SubtreeShape instance by the given segment.
Remarks
Parameters
A map of options to pass to the method.
- x1 - number
- the x-coordinate of the first point of the segment
- y1 - number
- the y-coordinate of the first point of the segment
- x2 - number
- the x-coordinate of the second point of the segment
- y2 - number
- the y-coordinate of the second point of the segment
See Also
Adds another point to the connector.
Remarks
Parameters
A map of options to pass to the method.
- x - number
- the current x-coordinate of the point
- y - number
- the current y-coordinate of the point
Appends all target points that have previously been added to this shape to the given LayoutEdge instance.
Remarks
Parameters
A map of options to pass to the method.
- edge - LayoutEdge
- the LayoutEdge that will be modified
See Also
Creates a clone of this SubtreeShape instance, modifying it using the provided transformation matrix.
Parameters
A map of options to pass to the method.
- transform - SubtreeTransform
- The transform that defines the modification for the new instance
Returns
- ↪SubtreeShape
- The clone of this SubtreeShape instance
Returns the BorderLine instance that describes the SubtreeShape at the given side.
Parameters
A map of options to pass to the method.
- side - Side
- one of the predefined borderline directions
Returns
- ↪BorderLine
- the BorderLine instance for the given side
Throws
- Exception({ name: 'ArgumentError' })
- if the given index is invalid
Merges the given SubtreeShape instance with this SubtreeShape instance.
Remarks
Parameters
A map of options to pass to the method.
- other - SubtreeShape
- the SubtreeShape to be merged with this SubtreeShape
Moves this SubtreeShape instance and its connector by the given offsets.
Remarks
Parameters
A map of options to pass to the method.
- dx - number
- the delta x-offset by which this shape will be moved
- dy - number
- the delta y-offset by which this shape will be moved
Returns a string representation of the SubtreeShape instance.
Returns
- ↪string
- A string representation of the SubtreeShape instance.
Adds the line segments of the connector to the bounds of this SubtreeShape instance.