Base interface for items that can be used in a CanvasComponent.
Inheritance Hierarchy
Implemented Interfaces
Remarks
Most prominently this is the interface all graph elements used in IGraph implement.
It adds no functionality over the ILookup and ITagOwner interfaces it inherits.
Type Details
- yFiles module
- view
See Also
Bends,
Z-order Commands,
General Drag and Drop Support,
Customizing the Items to be Cut, Copied, Pasted, or Duplicated,
IObjectRenderer
Properties
Gets or sets the tag object associated with this item instance.
Remarks
The tag is an optional user-defined object which can be used to store arbitrary data related to this item. The item itself just provides the storage for the object.
Property Value
The user object associated with this item instance.
Examples
owner.tag = newTag
const tag = owner.tag
See Also
Augmenting the tag property,
Nodes,
Edges,
Labels,
Ports,
Associating Data with Graph Elements,
Delegating Styles,
Using Data Binding in Node Styles,
Adding Custom Data for Serialization
Defined in
Methods
Returns an instance that implements the given type or null
.
Remarks
Typically, this method will be called to obtain a different view or aspect of the current instance. This is quite similar to casting or using a super type or interface of this instance, but is not limited to inheritance or compile-time constraints. An instance implementing this method is not required to return non-
null
implementations for the types, nor does it have to return the same instance any time. Also, it depends on the type and context whether the instance returned stays up to date or needs to be re-obtained for further use.Type Parameters
- T
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- type - Constructor<T>
- the type for which an instance shall be returned
Returns
- ↪T?
- an instance that is assignable to the type or
null