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
Properties
Gets or sets whether this ModelManager<T> is enabled.
Remarks
If the manager is disabled, it will not install the IRenderTreeElements into the associated CanvasComponent.
The default is true
, i.e. this manager is enabled by default.
Property Value
true
if enabled; false
otherwise.Methods
Installs an item and adds it to this manager's set of managed items.
Remarks
false
, the item will not be installed.Parameters
A map of options to pass to the method.
- item - T
- The item to add.
Returns
- ↪IRenderTreeElement?
- The newly created render tree element or
null
if nothing was installed.
Called by installItem to retrieve the renderer 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 a renderer for.
Returns
- ↪IObjectRenderer<T>?
- A renderer or
null
Called by installItem to retrieve the render tree 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 render tree group for.
Returns
- ↪IRenderTreeGroup?
- An IRenderTreeGroup or
null
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.
- canvasComponent - CanvasComponent
- The CanvasComponent instance to install this manager instance in.
Throws
- Exception({ name: 'ArgumentError' })
- if
canvasComponent
isnull
.
Installs a member of the collection into the canvas using the IObjectRenderer<T> which is returned by getRenderer.
Parameters
A map of options to pass to the method.
- item - T
- The member to install.
Returns
- ↪IRenderTreeElement?
- The new render tree element or
null
if the item was not installed.
Called when this manager gets disabled.
Called when this manager gets enabled.
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.
- canvasComponent - CanvasComponent
- The CanvasComponent to remove this manager instance from.
Removes the given IRenderTreeElement.
Parameters
A map of options to pass to the method.
- renderTreeElement - IRenderTreeElement
- The render tree element that has been associated with the renderer.