Interface implemented by input modes that can be registered with a CanvasComponent instance.
Remarks
Input modes capture user gestures (or any other kind of "input") and manipulate the contents of the scene graph or the model behind the scene graph.
Implementations may request an input mutex from the ConcurrencyController that will be given to them in their install method. This allows them to exclusively modify the contents of the view. If another IInputMode successfully acquires the mutex, the ConcurrencyController will be deactivated.
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.input.IInputMode
See Also
Properties
Gets the context instance this mode is currently installed in or null
if this instance is not installed.
Remarks
Gets the priority of this input mode.
Remarks
See Also
Methods
Installs this mode into the given context that is provided by the canvas.
Remarks
In general a mode can only be installed into a single canvas at all times.
This method is called to initialize this instance. Subclasses should override this method to register the corresponding event handler delegates for the various input events they need to register with.
When this instance gets uninstalled from the context the same context instance will be passed to it.
Implementations may hold a reference to the context
instance and use it while they are being installed.
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context that this instance shall be installed into. The same instance will be passed to this instance during uninstall. A reference to the context may be kept and queried during the time the mode is installed.
- controller - ConcurrencyController
- The ConcurrencyController for this mode.
See Also
Called by the client in order to stop a current editing progress.
Remarks
false
Returns
- ↪boolean
true
if and only if the editing has been stopped or there was no edit in progress
See Also
Uninstalls this mode from the given context.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context to deregister from. This is the same instance that had been passed to install during installation.