A label model that can be used to describe any position and orientation of a label.
Remarks
The position of the label is stored absolutely and is not influenced by the layout or position of the owner of the label. In fact, the owner is not even queried during a call to getGeometry.
Type Details
- yFiles module
- view
See Also
Methods
Creates a new label model parameter that places the label at the given absolute position using the provided angle.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- anchorLocation - Point
- The location for the parameter.
- angle - number
- The angle of rotation. The default is 0.
Returns
- ↪AbsoluteFreeLabelModelParameter
- A new parameter that is associated with this instance.
Creates a new label at the given dynamic location using the provided angle.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- location - IPoint
- The location to place the parameter at. That instance is stored by reference.
- angle - number
- The angle of rotation. The default is 0.
Returns
- ↪AnchoredFreeLabelModelParameter
- A new parameter that is associated with this instance.
Creates a new label model parameter that dynamically reads the label layout from the provided instance.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- layout - IOrientedRectangle
- The oriented rectangle to dynamically retrieve the values from.
Returns
- ↪DynamicFreeLabelModelParameter
- A new parameter that is associated with this instance.
Provides a lookup context for the given label.
Calculates the geometry of the given label using the given model parameter.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- 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.
Returns
- ↪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.
Implements
Constants
A shared public instance that can be used to obtain parameters.