Represents a label associated with an edge in the graph data structure LayoutGraph.
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
Default Values of Properties
Type Details
- yFiles module
- algorithms
See Also
Properties
Gets or sets whether the position of an edge label is modeled relative to its owner or absolute.
Remarks
This property should only be changed temporarily within custom labeling implementations. Built-in layout algorithms assume that absolutePlacement is set to false
.
This property determines whether the label's position changes when its owner moves. If set to false
, the label moves relative to its owner. If set to true
, the label's position is fixed and does not change when the owner moves.
Default Value
Gets or sets a snapshot of the bounds of the edge label as an IOrientedRectangle.
Remarks
The bounds are represented as an IOrientedRectangle that defines the label's absolute position and orientation within the drawing space.
The layout getter returns a snapshot of the current bounds. Modifying this snapshot will not affect the actual bounds of the label.
Gets the edge to which this label belongs.
Gets or sets the tag object associated with this item instance.
Remarks
See Also
Implements
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.
Type Parameters
- TData
- The type of the data to retrieve.
Parameters
A map of options to pass to the method.
- 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.
Returns
- ↪TData?
- The data item associated with this edge label in the IMapper<K,V> if found, otherwise the default value of
TData
.