Creates a new UndoManager instance
Optional
limit: numberReturns the current limit of the UndoManager
Sets the limit of the UndoManager.
This limits the size of the undoStack. If the size of the undoStack exceeds the limit, the oldest Undoables on the stack are removed.
If the new limit is lower than the old limit, the oldest items on the undoStack will be discarded, without applying them.
The new limit. Must be strictly positive.
Resets the UndoManager. This empties the Undoables;
A manager of Undoables.
You can undoables that you can undo or redo.
You can wire a keyboard shortcut, like CTRL+Z to undo, as follows:
You usually create undoables in response to an event from the API, and then add them to an UndoManager. You can find a list of common events in Undoable.
This example shows how to create Undoables in LuciadRIA:
You can find the full source, and more examples, in
samples/common/core/util/SampleUndoSupport.ts
.See the Adding undo/redo support to your application guide for more information on how to work with undo/redo in LuciadRIA.
See
Undoable
Since
2022.1