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
See Also
Members
Properties
Gets the current bounds of this SubtreeShape instance.
Property Value
Gets the direction of the last connector segment.
Property Value
See Also
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.
Gets the current maximum y-coordinate of this SubtreeShape instance.
Gets the current minimum x-coordinate of this SubtreeShape instance.
Gets the current minimum y-coordinate of this SubtreeShape instance.
Gets the current x-coordinate of the origin of this SubtreeShape instance.
Property Value
Gets the current y-coordinate of the origin of this SubtreeShape instance.
Property Value
Methods
Extends this SubtreeShape instance by the given rectangle.
Parameters
- 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.
Parameters
- graph: LayoutGraph
- the input graph
- edge: LayoutEdge
- the given edge
See Also
Extends this SubtreeShape instance by the given segment.
Parameters
- 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
Parameters
- 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.
Parameters
- 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
- transform?: SubtreeTransform
- The transform that defines the modification for the new instance
Return Value
- SubtreeShape
- The clone of this SubtreeShape instance
Returns the BorderLine instance that describes the SubtreeShape at the given side.
Parameters
- side: Side
- one of the predefined borderline directions
Return Value
- 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.
Parameters
- other: SubtreeShape
- the SubtreeShape to be merged with this SubtreeShape
Moves this SubtreeShape instance and its connector by the given offsets.
Parameters
- 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