An implementation of the IInputModeContext for use within the scope of IInputModes.
Remarks
Type Details
- yFiles module
- view
Constructors
Creates a new instance of a context that is nested within the parentInputModeContext
.
Remarks
The lookup behavior of this instance will by default delegate all queries to the parentInputModeContext
, unless the provided IInputModeContext implements the requested type, already. Then, the input mode instance will be returned.
Use the getDecoratorFor method to add additional lookup behavior to this instance.
Parameters
A map of options to pass to the method.
- parentInputModeContext - IInputModeContext
- The enclosing context to which lookup calls will be delegated to that will not be answered by this instance.
- inputMode - IInputMode
- The optional IInputMode that establishes this nested context. This will be set as the inputMode property, when specified. When omitted, the
parentInputModeContext
's property will be returned, instead.
Properties
Gets the Canvas that is associated with this context.
Implements
Tries to retrieve an IGraph instance from an IInputModeContext.
Remarks
Defined in
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.
Implements
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.
Implements
Gets the current zoom level that is the ratio of world coordinates to screen pixels.
Implements
Methods
addGenericLookup
(genericLink: function(IInputModeContext, Constructor, IContextLookup):any) : IContextLookupChainLinkAdds a generic callback as a chain link to the lookup.
Remarks
Parameters
A map of options to pass to the method.
- genericLink - function(IInputModeContext, Constructor, IContextLookup):any
- The generic callback to add to the lookup chain.
Signature Details
function(arg1: IInputModeContext, arg2: Constructor, arg3: IContextLookup) : any
Encapsulates a method that has three parameters and returns a value of the type specified by theTResult
parameter.Parameters
- arg1 - IInputModeContext
- The first parameter of the method that this delegate encapsulates.
- arg2 - Constructor
- The second parameter of the method that this delegate encapsulates.
- arg3 - IContextLookup
- The third parameter of the method that this delegate encapsulates.
Returns
- any
- The return value of the method that this delegate encapsulates.
Returns
- ↪IContextLookupChainLink
- An IContextLookupChainLink that has been added to the lookup.
getDecoratorFor
<TInterface>(interfaceType: Constructor<TInterface>) : LookupDecorator<IInputModeContext,TInterface>Creates a LookupDecorator<IInputModeContext,TInterface> for this instance that can be used to modify the lookup behavior of this instance.
Type Parameters
- TInterface
Returns
- ↪LookupDecorator<IInputModeContext,TInterface>
- A helper class to decorate the lookup.
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.
Implements
Tries to call invalidateDisplays on the graph obtained from the IInputModeContext.
Implements the ILookup interface for this class.
Remarks
Type Parameters
- T
Parameters
A map of options to pass to the method.
- type - Constructor<T>
- The type to request an implementation for.
Returns
- ↪T?
- An implementation or
null