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.
Remarks
Type Details
- yFiles module
- view
See Also
Properties
Gets the Canvas that is associated with this context.
Defined in
Tries to retrieve an IGraph instance from an IInputModeContext.
Remarks
Gets the radius for hit tests and marquee selection tests in world coordinates.
Remarks
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.
See Also
Defined in
Gets the IInputMode which this context conceptually has been created for.
Remarks
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.
Gets the current zoom level that is the ratio of world coordinates to screen pixels.
Defined in
Methods
Adds an element to the defs section of the document, if it has not been added yet.
Parameters
A map of options to pass to the method.
- defsSupport - ISvgDefsCreator
- The instance that is used to create and update the element and to query if the element is still referenced
Returns
- ↪string
- The id of the element with which it can be referenced using an url reference.
Defined in
Tries to call invalidateDisplays on the graph obtained from the IInputModeContext.
Remarks
Returns an instance that implements the given type or null
.
Remarks
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
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