Class TreeVertex

This holds TreeLayout-specific information about Nodes.

Hierarchy

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(): TreeVertex

Returns

TreeVertex

Properties

public alignment: EnumValue

Gets or sets how this parent node should be aligned relative to its children.

public angle: number

Gets or sets the actual absolute angle at which this node should grow.

public bounds: Rect

Gets or sets the Bounds of this vertex, in document coordinates.

public breadthLimit: number

Gets or sets how broad a node and its descendants should be.

public centerX: number

Gets or sets the center Point.x of this vertex, in document coordinates.

public centerY: number

Gets or sets the center Point.y of this vertex, in document coordinates.

public childPortSpot: Spot

Gets or sets the spot that children nodes' ports get as their ToSpot, if #setsChildPortSpot is true and the node has only a single port.

public children: Array<any>

Gets or sets the logical children for this node.

public childrenCount: number

Gets the number of immediate children this node has.

public commentMargin: number

Gets or sets the space to leave between the node and the comments.

public commentSpacing: number

Gets or sets the space to leave between consecutive comments.

public comments: Array<any>

Gets or sets an array of Nodes that will be positioned near this node.

public compaction: EnumValue

Gets or sets how the children of this node should be packed together.

public comparer: (a: go.TreeVertex, b: go.TreeVertex) => number

Gets or sets how the children should be sorted.

public descendantCount: number

Gets or sets the number of descendants this node has.

public destinationEdges: Iterator

Gets an iterator for all of the edges that go out of this vertex.

public destinationVertexes: Iterator

Gets an iterator for all of the vertexes that are connected with edges going out of this vertex.

public edges: Iterator

Gets an iterator for all of the edges that are connected with this vertex in either direction.

public edgesCount: number

Gets the total number of edges that are connected with this vertex in either direction.

public focus: Point

Gets or sets the offset of the #centerX and #centerY from the #bounds position.

public focusX: number

Gets or sets the relative X position of the "center" point, the focus.

public focusY: number

Gets or sets the relative Y position of the "center" point, the focus.

public height: number

Gets or sets the height of this vertex.

public initialized: boolean

Gets or sets whether this node has been initialized as part of TreeLayout#doLayout when building the tree structures.

public layerSpacing: number

Gets or sets the distance between this node and its children.

public layerSpacingParentOverlap: number

Gets or sets the fraction of this node's depth that may overlap with the children's layer.

public level: number

Gets or sets the number of single-parent ancestors this node has.

public maxChildrenCount: number

Gets or sets the maximum number of children of any descendant of this node.

public maxGenerationCount: number

Gets or sets the maximum depth of the subtrees below this node.

public network: LayoutNetwork

Gets or sets the LayoutNetwork that owns this vertex.

public node: Node

Gets or sets the Node associated with this vertex, if any.

public nodeIndent: number

Gets or sets the distance the first child should be indented.

public nodeIndentPastParent: number

Gets or sets whether the first child should be indented past the parent node's breadth.

public nodeSpacing: number

Gets or sets the distance between child nodes.

public parent: TreeVertex

Gets or sets the logical parent for this node.

public portSpot: Spot

Gets or sets the spot that this node's port gets as its FromSpot, if #setsPortSpot is true and the node has only a single port.

public relativePosition: Point

Gets or sets the position of this node relative to its parent node.

public rowIndent: number

Gets or sets the distance the first child of each row should be indented.

public rowSpacing: number

Gets or sets the distance between rows within one layer, all sharing the same parent.

public setsChildPortSpot: boolean

Gets or sets whether the TreeLayout should set the ToSpot for each child node port.

public setsPortSpot: boolean

Gets or sets whether the TreeLayout should set the FromSpot for this parent node port.

public sorting: EnumValue

Gets or sets whether and in what order the children should be sorted.

public sourceEdges: Iterator

Gets an iterator for all of the edges that come into this vertex.

public sourceVertexes: Iterator

Gets an iterator for all of the vertexes that are connected with edges coming into this vertex.

public subtreeOffset: Point

Gets or sets the offset of this parent node relative to its whole subtree.

public subtreeSize: Size

Gets or sets the size of the subtree (including all descendants) parented by this node.

public vertexes: Iterator

Gets an iterator for all of the vertexes that are connected in either direction with this vertex.

public width: number

Gets or sets the width of this vertex.

public x: number

Gets or sets the left point of this vertex.

public y: number

Gets or sets the top point of this vertex.

Methods

public addDestinationEdge(edge: LayoutEdge): any

Adds a LayoutEdge to the list of successors (the edge will be going out from this vertex).

Parameters

Returns

any

public addSourceEdge(edge: LayoutEdge): any

Adds a LayoutEdge to the list of predecessors (the edge will be coming into this vertex).

Parameters

Returns

any

public commit(): any

Moves the Node corresponding to this vertex so that its position is at the current #bounds point.

Returns

any

public copyInheritedPropertiesFrom(copy: TreeVertex): any

Copy inherited properties from another TreeVertex to this one.

Parameters

Returns

any

public deleteDestinationEdge(edge: LayoutEdge): any

Deletes a LayoutEdge from the list of successors (the edge was going out from this vertex).

Parameters

Returns

any

public deleteSourceEdge(edge: LayoutEdge): any

Deletes a LayoutEdge from the list of predecessors (the edge was coming into this vertex).

Parameters

Returns

any