A basis implementation of ISelectionIndicatorInstaller, IFocusIndicatorInstaller and IHighlightIndicatorInstaller that draws a rectangle using a template.
Remarks
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.view.RectangleIndicatorInstaller
See Also
Constructors
Initializes a new instance of the RectangleIndicatorInstaller class without fixed bounds.
Remarks
Initializes a new instance of the RectangleIndicatorInstaller class with fixed bounds and a string.
Remarks
The given IRectangle is used for all items as object that is added to the ICanvasObjectGroup in the addCanvasObject method.
If the template property is not set, the resourceKey
is used to lookup a IVisualTemplate in the resources of the CanvasComponent. If there is none, a default template is used.
Properties
Gets or sets the IVisualTemplate to use for this indicator.
Remarks
See Also
Gets or sets whether the installed rectangle will be drawn in the View coordinate system as opposed to the Intermediate coordinate system.
Remarks
Drawing in the View coordinate system forces the Visual to be rectangular under any projection.
If no projection is set, this setting has no effect.
Default is false
.
Methods
This the main method of the interface that performs the installation of an item's visual representation in the canvas by adding ICanvasObjects.
Parameters
A map of options to pass to the method.
- context - ICanvasContext
- The context that contains the information required to install the visual representation.
- group - ICanvasObjectGroup
- The canvas object group to add the newly generated ICanvasObject to.
- item - Object
- The item to install.
Returns
- ↪ICanvasObject
- The newly generated ICanvasObject for the item's visual representation.
null
if nothing was installed.
See Also
Implements
Factory method that returns an IRectangle for a given user object.
Remarks
This method is called for the object to add to the ICanvasObjectGroup, if there are no fixed bounds set on this instance (i.e. the parameterless constructor was used to instantiate this class).
This implementation returns null for every given object.
Returns
See Also
Constants
A string that will be used to find the IVisualTemplate for drawing the focus indicator.
Remarks
The default template has the yfiles-focus-template
and yfiles-node-focus-template
CSS classes.
This template key is used to visualize node focus and the default template uses a rectangle with dashed stroke in the primaryColor of the current theme.
See Also
A string that will be used to find the IVisualTemplate for drawing the highlight indicator.
Remarks
The default template has the yfiles-highlight-template
and yfiles-node-highlight-template
CSS classes.
This template key is used to visualize node highlight and the default template uses colors based on the ThemeVariant of the current theme:
- CLASSIC – Rectangle with double-stroked border or corners using primaryColor and backgroundColor in-between.
- SIMPLE_ROUND and SIMPLE_SQUARE – Rectangle with stroke in secondaryColor.
See Also
A string that will be used to find the IVisualTemplate for drawing the selection indicator.
Remarks
The default template has the yfiles-selection-template
and yfiles-node-selection-template
CSS classes.
This template key is used to visualize node selection and the default template uses colors based on the ThemeVariant of the current theme:
- CLASSIC – Rectangle with hatch brush stroke using primaryColor and backgroundColor.
- SIMPLE_ROUND and SIMPLE_SQUARE – Rectangle with stroke in primaryColor.