Main class JSUndoManager

Constructors

Properties

enabled: boolean = true
limit: number
options: JSUndoManagerOptions = ...
presets: Record<string, (c: JSUndoManagerCommand2) => JSUndoManagerCommand1> = {}
sp: number

Methods

  • 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.

    Returns JSUndoManager

  • Check whether redoing command is possible

    Returns boolean

  • Check whether undoing previous command is possible

    Returns boolean

  • Get number of commands in memory stack

    Returns number

  • Check whether the commands stack is empty

    Returns boolean

  • Check whether the commands stack size reaches its limit

    Returns boolean

  • Parameters

    • msg: string
    • ...args: any[]

    Returns void