Allows the use of an ILabelStyle to render the selection, highlight or focus indicator of labels.
Remarks
The renderer of the labelStyle used by this class must create SvgVisuals.
The zoomPolicy property defines how the zoom level affects the rendering of the indicator. It can either scale according to the zoom level similar to regular graph items or have always to same thickness regardless of the zoom, similar to the default yFiles indicators.
An alternative to this class is setting an instance of IndicatorLabelStyleDecorator to the labelStyle property of the GraphSelectionIndicatorManager, GraphFocusIndicatorManager or GraphHighlightIndicatorManager classes.
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.view.LabelStyleDecorationInstaller
See Also
Constructors
Create a new instance of this class.
Parameters
A map of options to pass to the method.
- zoomPolicy - StyleDecorationZoomPolicy
How the style is affected by the current zoom level. This option sets the zoomPolicy property on the created object.
- margins - Insets
The margins around the label layout. This option sets the margins property on the created object.
- labelStyle - ILabelStyle
The style to use for the rendering. This option sets the labelStyle property on the created object.
Properties
Gets or sets the style to use for the rendering.
Remarks
Changes of the value of this property are not propagated to already created styles.
The default value is an instance of DefaultLabelStyle.
Gets or sets the margins around the label layout.
Remarks
Actually, the bounds rendered by the style is the original label layout enlarged by these margins.
Changes of the value of this property are propagated to all styles created by this instance and become immediately visible.
The default margins have a value of 5
for all four sides.
Gets or sets how the style is affected by the current zoom level.
Remarks
Changes of the value of this property are propagated to all styles created by this instance and become immediately visible.
The default value is VIEW_COORDINATES.
Methods
Installs a rendering for the item
if it is an ILabel.
Parameters
A map of options to pass to the method.
- context - ICanvasContext
- The canvas context.
- group - ICanvasObjectGroup
- The canvas object group to add the newly created canvas object to.
- item - Object
- The item to install.
Returns
- ↪ICanvasObject
- The canvas object representing the item.