Class LayoutVertex

A vertex represents a node in a LayoutNetwork. It holds layout-specific data for the node.

Hierarchy

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(): LayoutVertex

This constructs a vertex that does not know about any Node.

Returns

LayoutVertex

Properties

public bounds: Rect

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

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 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 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 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 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 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

public static smartComparer(m: LayoutVertex, n: LayoutVertex): number

This static method is used to compare the Part#text values of the #nodes of the argument LayoutVertexes.

Parameters

Returns

number

public static standardComparer(m: LayoutVertex, n: LayoutVertex): number

This static method is used to compare the Part#text values of the #nodes of the argument LayoutVertexes.

Parameters

Returns

number