Constructor
new HistoryManager(optionsopt)
Parameters:
| Name | Type | Attributes | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | <optional> | Optional configuration.Properties
|
Classes
Members
canRedo
canUndo
Methods
clear()
Clears both stacks.
push(command)
Pushes a command onto the undo stack and clears the redo stack.
Parameters:
| Name | Type | Description |
|---|---|---|
command | object | The command object with undo, redo, label, and dirtyFlags properties. |
(async) redo() → {Promise.<(object|null)>}
Redoes the most recently undone command. Returns the command after awaiting redo().
Returns:
- Type:
- Promise.<(object|null)>
(async) undo() → {Promise.<(object|null)>}
Undoes the most recent command. Returns the command after awaiting undo().
Returns:
- Type:
- Promise.<(object|null)>