C

FreeEdgeLabelModel

An edge label model that can be used to describe any position and orientation of a label.
ImplementsInheritance Hierarchy

Remarks

The position of the label is stored relative to the positions of the ports of the edge the label belongs to.

See Also

Developer's Guide

Members

No filters for this type

Constructors

Parameters

Properties

Gets or sets a property that indicates whether the angle used by the parameter should be interpreted relative to the edge's orientation or as an absolute angle in the coordinate system.
By default, the angle is interpreted to be relative to the world coordinate axes.

Methods

Creates a parameter for the given location.
final

Parameters

ratio?: number
The ratio at which the label will be anchored between the location of the source port and the location of the target port. The default is 0.5.
distance?: number
The distance orthogonally to the connection between the source and target point. The default is 0.
angle?: number
The angle by which the label should be rotated. The default is 0.

Return Value

FreeEdgeLabelModelParameter
A parameter that describes the position.

See Also

API
edgeRelativeAngle
Tries to find a parameter that best matches the given layout for the provided label instance.
This implementation will match the provided layout perfectly.
final

Parameters

label: ILabel
The label to find a parameter for.
layout: IOrientedRectangle
The anticipated layout for the label.

Return Value

ILabelModelParameter
A non-null parameter that can be used for the label to approximate the provided layout.
Provides a lookup context for the given label.

Parameters

label: ILabel
The label to use in the context.

Return Value

ILookup
An implementation of the ILookup interface that can be used to query additional aspects of the label.
Calculates the geometry of the given label using the given model parameter.
final

Parameters

label: ILabel
The label to calculate the geometry for.
layoutParameter: ILabelModelParameter
A parameter that is compatible with this model. Typically, this is a parameter that has been created by this model, and its property model returns this instance.

Return Value

IOrientedRectangle
An IOrientedRectangle that describes the geometry of the label. This is typically designed as a flyweight, therefore clients should not cache the instance but store the values if they need a snapshot for later use.

Constants

A shared unmodifiable public instance that can be used to obtain parameters.