Presets for commands, allows to define command types and their handlers. A preset maps from a JSUndoManagerCommand2 to a JSUndoManagerCommand1.
To add a preset, simply set it on this object, or using Object.assign
.
Bind 'undo' and 'redo' actions to 'Ctrl/Cmd+Z', 'Ctrl+Y' & 'Ctrl/Cmd+Shift+Z' hot keys. It is a basic implementation for quick testing and should be replaced with custom event handlers for more flexible processing.
Removes the event listeners and clears the stack
Execute function and record it with its opposite "undo" function
either an object with "redo" and "undo" functions
Get the last command that was done
Gets the last command that was undone
Remember executed command containing "redo" and "undo" functions
either an object with "redo" and "undo" functions
Redo the command which was previously undone
Reset all commands from memory
Change stack size limit initially defined in the constructor options
Undo previous command if possible
Simple JavaScript undo/redo command manager supporting transactions with no dependencies.
Fork Of JavaScript Undo Manager 1.0.0, by Alexey Grinko, licensed under MIT License.
Changes -