LayoutVertex class
A vertex represents a Node in a LayoutNetwork, along with its #bounds and #focus and collections of LayoutEdges that come into and go out of the vertex. The #node property may be null for vertexes that represent "dummy" nodes, when the layout wants to work with a network that is not isomorphic with the collection of Nodes and Links being laid out.
This holds layout-specific data for the node. For each kind of layout that uses a LayoutNetwork there is a subclass of LayoutVertex and a subclass of LayoutEdge:
- CircularLayout: CircularVertex and CircularEdge
- ForceDirectedLayout: ForceDirectedVertex and ForceDirectedEdge
- LayeredDigraphLayout: LayeredDigraphVertex and LayeredDigraphEdge
- TreeLayout: TreeVertex and TreeEdge
Modifying a LayoutNetwork or a LayoutVertex or a LayoutEdge does not invalidate the Layout or raise any changed events.
- Implementers
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
- LayoutVertex(LayoutNetwork network)
-
factory
Properties
- bounds ↔ Rect
-
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
Gets or sets the bounds of this vertex, in document coordinates. Setting this property does not directly modify the position of any Node, but it will modify the value of #centerX and #centerY, as well as the subsidiary convenience properties #x, #y, #width, and #height.getter/setter pair - centerX ↔ num
-
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
Gets or sets the center Point#x of this vertex, in document coordinates. This property depends on both #bounds and #focus. Setting this property does not modify the position of any Node, but it will modify the value of #bounds.getter/setter pair - centerY ↔ num
-
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
Gets or sets the center Point#y of this vertex, in document coordinates. This property depends on both #bounds and #focus. Setting this property does not modify the position of any Node, but it will modify the value of #bounds.getter/setter pair - data ↔ Object?
-
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
Gets or sets the data object in the model that should be associated with this vertex, if any. The value will be non-null if this vertex is virtualized, not represented by a real Node in the Diagram. Each data object should have a 'bounds' property that is a Rect or any JavaScript Object with 'x', 'y', 'width', and 'height' properties that are real numbers, and non-negative numbers for the width and the height. Setting this data property will also set the #bounds and #focus properties.getter/setter pair -
destinationEdges
↔ Iterator<
LayoutEdge> -
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
This read-only property returns an iterator for all of the edges that go out of this vertex.getter/setter pair -
destinationEdgesArrayAccess
↔ Array<
LayoutEdge> -
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
(undocumented)getter/setter pair -
destinationVertexes
↔ Iterator<
LayoutVertex> -
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
This read-only property returns an iterator for all of the vertexes that are connected with edges going out of this vertex.getter/setter pair -
edges
↔ Iterator<
LayoutEdge> -
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
This read-only property returns an iterator for all of the edges that are connected with this vertex in either direction.getter/setter pair - edgesCount ↔ num
-
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
This read-only property returns the total number of edges that are connected with this vertex in either direction.getter/setter pair - focus ↔ Point
-
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
Gets or sets the offset of the #focusX and #focusY from the #bounds position. Setting this property does not directly modify the position of any Node, but it does affect the value of #centerX and #centerY.getter/setter pair - focusX ↔ num
-
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
Gets or sets the relative X position of the "center" point, the focus.getter/setter pair - focusY ↔ num
-
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
Gets or sets the relative Y position of the "center" point, the focus.getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- height ↔ num
-
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
Gets or sets the height of this vertex. This is always the vertical distance reserved for the node.getter/setter pair - network ↔ LayoutNetwork
-
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
Gets the LayoutNetwork that owns this vertex. The default value is null. It is set automatically for you in LayoutNetwork#createVertex.getter/setter pair - node ↔ Node?
-
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
Gets or sets the Node associated with this vertex, if any. The value may be null if this vertex is a "dummy" vertex, not represented by a real Node in the Diagram.getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sourceEdges
↔ Iterator<
LayoutEdge> -
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
This read-only property returns an iterator for all of the edges that come into this vertex.getter/setter pair -
sourceEdgesArrayAccess
↔ Array<
LayoutEdge> -
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
(undocumented)getter/setter pair -
sourceVertexes
↔ Iterator<
LayoutVertex> -
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
This read-only property returns an iterator for all of the vertexes that are connected with edges coming into this vertex.getter/setter pair -
vertexes
↔ Iterator<
LayoutVertex> -
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
This read-only property returns an iterator for all of the vertexes that are connected in either direction with this vertex.getter/setter pair - width ↔ num
-
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
Gets or sets the width of this vertex. This is always the horizontal distance reserved for the node.getter/setter pair - x ↔ num
-
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
Gets or sets the left point of this vertex.getter/setter pair - y ↔ num
-
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
Gets or sets the top point of this vertex.getter/setter pair
Methods
-
addDestinationEdge(
LayoutEdge edge) → void -
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
Adds a LayoutEdge to the list of successors (the edge will be going out from this vertex). Calling this method does not modify the LayoutEdge#fromVertex of the LayoutEdge. @param {LayoutEdge} edge -
addSourceEdge(
LayoutEdge edge) → void -
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
Adds a LayoutEdge to the list of predecessors (the edge will be coming into this vertex). Calling this method does not modify the LayoutEdge#toVertex of the LayoutEdge. @param {LayoutEdge} edge -
commit(
) → void -
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
Moves the Node corresponding to this vertex so that its position is at the current #bounds point. -
deleteDestinationEdge(
LayoutEdge edge) → void -
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
Deletes a LayoutEdge from the list of successors (the edge was going out from this vertex). Calling this method does not modify the LayoutEdge#fromVertex of the LayoutEdge. @param {LayoutEdge} edge -
deleteSourceEdge(
LayoutEdge edge) → void -
Available on LayoutVertex, provided by the LayoutVertex$Typings extension
Deletes a LayoutEdge from the list of predecessors (the edge was coming into this vertex). Calling this method does not modify the LayoutEdge#toVertex of the LayoutEdge. @param {LayoutEdge} edge -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
smartComparer(
LayoutVertex m, LayoutVertex n) → num - This static function is used to compare the Part#text values of the #nodes of the argument LayoutVertexes. If the text ends in a number, the values are compared as numbers rather than lexicographically. Naturally this comparison is significantly slower than LayoutVertex.standardComparer.
-
standardComparer(
LayoutVertex m, LayoutVertex n) → num - This static function is used to compare the Part#text values of the #nodes of the argument LayoutVertexes. This just does a simple case-sensitive string comparison. Alternatively you may wish to use LayoutVertex.smartComparer or write your own comparison function.