C

LayoutNodeLabel

Represents a label for a node within a LayoutGraph data structure.
ImplementsInheritance Hierarchy

Remarks

A LayoutNodeLabel encapsulates a possibly rotated rectangular area represented by an IOrientedRectangle. This rectangle defines the boundaries for the label's content, such as text or images.

This class cannot be instantiated

See Also

Developer's Guide

Members

Show:

Properties

Gets the index of this label within its owner's collection of labels.
readonlyfinal

Property Value

The zero-based index of the label in the owner's label collection.
Gets or sets the bounds of the node label.

The bounds are represented as an IOrientedRectangle, that defines the label's absolute position and orientation within the drawing space.

The layout property returns a snapshot of the label's current bounds. Changes applied to a returned snapshot do not affect the label itself.

final
Gets the owner of this node label.
readonlyfinal

Property Value

The LayoutNode that owns this label, or null if not assigned.
Gets or sets the tag object associated with this item instance.
The tag is an optional user-defined object which can be used to store arbitrary data related to this item. The item itself just provides the storage for the object.
final

Implements

ITagOwner.tag

Methods

Returns the data stored for the node label in the IMapper<K, V> registered with the LayoutGraph of the owner under the given look-up key.
final

Parameters

dataKey: NodeLabelDataKey<TData>

This node label must currently be in a LayoutGraph, otherwise, this method will throw an exception. Directly use getItemData if it is required to access that of node labels that are temporarily removed from the graph.

The look-up key that is used to query the map from the graph, containing the data for the node label.

Return Value

TData
The data item associated with this node label in the IMapper<K, V> if found, otherwise the default value of TData.

Throws

Exception ({ name: 'ArgumentError' })
Thrown if this node label does not belong to a graph, i.e., the graph property of the owner is null.