Manages the visual representations of items in a CanvasComponent.
Type Parameters
- T
- The type of items this instance deals with.
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.view.ModelManager
See Also
Properties
Gets or sets whether this ModelManager<T> is enabled.
Remarks
If the manager is disabled, it will not install the ICanvasObjects into the associated CanvasComponent.
The default is true
, i.e. this manager is enabled by default.
Methods
Installs an item and adds it to this managers set of managed items.
Remarks
Parameters
A map of options to pass to the method.
- item - T
- The item to add.
Returns
- ↪ICanvasObject
- The newly created canvas object or
null
if nothing was installed.
See Also
Called by installItem to retrieve the canvas object group for a given item.
Remarks
null
will cause installItem not to install anything.Parameters
A map of options to pass to the method.
- item - T
- The item to find a canvas object group for.
Returns
- ↪ICanvasObjectGroup
- An ICanvasObjectGroup or
null
See Also
Called by installItem to retrieve the installer for a given item.
Remarks
Implementations may use the lookup of the item.
Returning null
will cause installItem not to install anything.
Parameters
A map of options to pass to the method.
- item - T
- The item to find an installer for.
Returns
- ↪ICanvasObjectInstaller
- An installer or
null
See Also
Installs this instance in the given CanvasComponent instance.
Remarks
If this manager instance is set to a CanvasComponent instance using one of the properties focusIndicatorManager, selectionIndicatorManager, or highlightIndicatorManager, this method is called automatically.
In all other cases, this method must be called before using this manager instance.
Overriders must either call the base implementation or set the canvasComponent.
Parameters
A map of options to pass to the method.
- canvas - CanvasComponent
- The CanvasComponent instance to install this manager instance in.
Throws
- Exception({ name: 'ArgumentError' })
- if
canvas
isnull
.
Installs a member of the collection into the canvas using the ICanvasObjectDescriptor which is returned by getInstaller.
Parameters
A map of options to pass to the method.
- item - T
- The member to install.
Returns
- ↪ICanvasObject
- The canvas object that has been returned by the installer.
Called when this manager gets disabled.
See Also
Called when this manager gets enabled.
See Also
Uninstalls the provided item and removes it from this managers set of managed items.
Parameters
A map of options to pass to the method.
- item - T
- The item to remove.
See Also
Uninstalls this instance from the given CanvasComponent instance.
Remarks
If this manager instance has been set to a CanvasComponent instance using one of the properties focusIndicatorManager, selectionIndicatorManager, or highlightIndicatorManager, this method is called automatically when the property value is changed.
In all other cases, this method must be called when this manager instance is not used anymore.
Overriders must either call the base implementation or set the canvasComponent to null
.
Parameters
A map of options to pass to the method.
- canvas - CanvasComponent
- The CanvasComponent to remove this manager instance from.
Removes the given ICanvasObject.
Parameters
A map of options to pass to the method.
- canvasObject - ICanvasObject
- The canvas objects that have been associated with the descriptor.