Type Alias: CancelOperations()
CancelOperations = () =>
void
Function
Cancels any active modular operations like clone, move, or replace.
This function exits any currently active special interaction mode (clone, move, replace, etc.) and returns to the normal selection mode. It's useful as an "escape" or "cancel" action when the user wants to abort the current operation.
-
- Dispatches
mimeeq-modular-abort-action
- Dispatches
-
- and deactivates the current toolbar mode.
Returns
void
Example
// Cancel the current operation when the cancel button or Escape key is pressed
document.getElementById('cancel-btn').addEventListener('click', () => {
window.mimeeqApp.actions.cancelOperations();
});
document.addEventListener('keydown', (e) => {
if (e.key === 'Escape') {
window.mimeeqApp.actions.cancelOperations();
}
});