C

LayoutEdgeLabel

Represents a label associated with an edge in the graph data structure LayoutGraph.
ImplementsInheritance Hierarchy

Remarks

An LayoutEdgeLabel represents a potentially rotated rectangle that describes the bounding box of a label's content (such as text or an image) in a LayoutGraph. The label's bounds are described by an IOrientedRectangle, which defines both the position and orientation of the label within the graph.

This class cannot be instantiated

See Also

Developer's Guide

Members

Show:

Properties

Gets the index of this label in its owner edge's label collection.
readonlyfinal
Gets or sets the bounds of the edge 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 edge to which this label belongs.
readonlyfinal
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 edge label in the IMapper<K, V> registered with the LayoutGraph of the owner under the given look-up key.
final

Parameters

dataKey: EdgeLabelDataKey<TData>

This edge 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 edge 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 edge label.

Return Value

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

Throws

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