The interface for the context object that is passed to IInputMode instances during install and uninstall and IDragHandler implementations like IPositionHandler and IHandle to provide additional context for the implementations.
Implements
- I
- I
Remarks
Implementations of this interface can carry additional information through their lookup method.
See Also
Developer's Guide
API
- ILookup, IInputMode
Members
Show:
Properties
Gets the Canvas that is associated with this context.
Gets the Canvas that is associated with this context.
readonlyabstract
Defined in
ICanvasContext.canvasComponentTries to retrieve an IGraph instance from an IInputModeContext.
Tries to retrieve an IGraph instance from an IInputModeContext.
This will use the ILookup and if this yields nothing, it will use the ILookup of the canvasComponent or finally test if it is a GraphComponent to obtain the graph from.
readonly
In the default implementations, this property automatically distinguishes between different radii depending on the last interaction event type.
This value already takes the zoom level into account.
readonlyabstract
See Also
Developer's Guide
Defined in
ICanvasContext.hitTestRadiusGets the IInputMode which this context conceptually has been created for.
Gets the IInputMode which this context conceptually has been created for.
This can be null if this instance is used outside the context of an IInputMode.
When an IInputMode triggers an event, performs an action or invokes a callback that expects an IInputModeContext, typically that context will provide the invoking mode via this property.
readonlyabstract
Implemented in
InputModeContext.inputModereadonlyabstract
Defined in
ICanvasContext.zoomMethods
Adds an element to the defs section of the document, if it has not been added yet.
Adds an element to the defs section of the document, if it has not been added yet.
abstract
Parameters
- defsSupport: ISvgDefsCreator
- The instance that is used to create and update the element and to query if the element is still referenced
Return Value
- string
- The id of the element with which it can be referenced using an url reference.
Defined in
ICanvasContext.getDefsIdIf the graph instance cannot be found, invalidate will be called instead.
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.abstract
Parameters
- type: Constructor<T>
- the type for which an instance shall be returned
Return Value
- T
- an instance that is assignable to the type or
null
See Also
Developer's Guide