An IInputMode implementation that can be used to block user interaction.
Remarks
Setting the waiting property will try to cancel ongoing edits of the mutex owner and set the preferred cursor to waitCursor. This mode will try to add itself to the Lookup of the CanvasControl, so that other clients can make use of its functionality.
This mode uses an exclusive controller by default.
Examples
WaitInputMode
is installed as child mode of a GraphEditorInputMode or GraphViewerInputMode and can be retrieved from the waitInputMode property.Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.input.WaitInputMode
See Also
Constructors
Creates a new instance of this mode.
Parameters
A map of options to pass to the method.
- priority - number
- enabled - boolean
The enabled state of this input mode. This option sets the enabled property on the created object.
- waitCursor - Cursor
The WaitCursor property. This option sets the waitCursor property on the created object.
Properties
Gets the installed controller.
Gets or sets the enabled state of this input mode.
Remarks
Examples
Gets the context instance this mode is currently installed in or null
if this instance is not installed.
Remarks
Implements
Gets the priority of this input mode.
Remarks
See Also
Implements
Gets or sets the WaitCursor property.
Gets or sets the Waiting property.
Remarks
true
will start the waiting process. Setting it to false
will end the waiting.Examples
Methods
Called by the client to unconditionally cancel all editing.
Remarks
This will be called prior to the uninstalling of this instance.
In order to stop an active input mode manually, client code should use the following idiom:
if (!mode.tryStop()) {
mode.cancel()
}
Implements
Called when waiting is finished.
Remarks
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.
Overriding implementations should call the base implementation, first.
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 controller for this mode.
See Also
Implements
Called after cancel has been called.
Remarks
Can be overridden in subclasses to perform additional actions after the mode has been canceled.
This implementation does nothing.
Called after the active property of the installed ConcurrencyController has been set to true
.
Remarks
Can be overridden in subclasses to perform additional actions after the mode has been activated.
Overriding implementations should call the base implementation.
Called after the active property of the installed ConcurrencyController has been set to false
.
Remarks
Can be overridden in subclasses to perform additional actions after the mode has been deactivated.
Overriding implementations should call the base implementation.
Called after tryStop has been called.
Remarks
Can be overridden in subclasses to perform additional actions after the mode has been stopped.
This implementation does nothing.
Raises the WaitingEnded event.
Parameters
A map of options to pass to the method.
- evt - InputModeEventArgs
- The InputModeEventArgs instance containing the event data.
Raises the WaitingStarted event.
Parameters
A map of options to pass to the method.
- evt - InputModeEventArgs
- The InputModeEventArgs instance containing the event data.
This will initiate the waiting process by trying to requestMutexrequest the input mutex.
Remarks
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
Implements
Uninstalls this mode from the given context.
Remarks
This code should clean up all changes made to the canvas in the install method. After a mode has been uninstalled it can be installed again into the same or another canvas.
Overriding implementations should call the base implementation after their own code.
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.
Implements
Events
Occurs when the waiting ended.
Event Registration
addWaitingEndedListener(function(this, InputModeEventArgs):void)
Event Deregistration
removeWaitingEndedListener(function(this, InputModeEventArgs):void)
Signature Details
function(sender: this, evt: InputModeEventArgs)
Parameters
- sender - this
- The source of the event.
- evt - InputModeEventArgs
- An object that contains the event data.
Occurs when the waiting started.
Event Registration
addWaitingStartedListener(function(this, InputModeEventArgs):void)
Event Deregistration
removeWaitingStartedListener(function(this, InputModeEventArgs):void)
Signature Details
function(sender: this, evt: InputModeEventArgs)
Parameters
- sender - this
- The source of the event.
- evt - InputModeEventArgs
- An object that contains the event data.