Allows the use of an INodeStyle to render the selection, highlight or focus indicator of nodes.
Remarks
The renderer of the nodeStyle 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 IndicatorNodeStyleDecorator to the nodeStyle 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.NodeStyleDecorationInstaller
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 node layout. This option sets the margins property on the created object.
- nodeStyle - INodeStyle
The style to use for the rendering. This option sets the nodeStyle property on the created object.
Properties
Gets or sets the margins around the node layout.
Remarks
Actually, the bounds rendered by the style is the original node 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 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 ShapeNodeStyle.
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.
See Also
Methods
Installs a rendering for the item
if it is an INode.
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.