Skip to content

Class: DiagramNode ​

One user-authored point in its place in the diagram's tree — a node or an asst, never a generated pres point or a transition label. See Diagram.nodes.

Constructors ​

Constructor ​

new DiagramNode(point, parent, level): DiagramNode

Parameters ​

ParameterTypeDescription
pointDiagramPointThe point itself: its text, its type, and its link to what is drawn for it.
parentDiagramNode | nullThe parent node, or null for a root.
levelnumberDepth below the root, 0 for a root.

Returns ​

DiagramNode

Properties ​

children ​

readonly children: DiagramNode[] = []

Child nodes, ordered by their parOf edge's @srcOrd. Empty for a leaf.


level ​

readonly level: number

Depth below the root, 0 for a root.


parent ​

readonly parent: DiagramNode | null

The parent node, or null for a root.


point ​

readonly point: DiagramPoint

The point itself: its text, its type, and its link to what is drawn for it.