The undo history changed (EventListenerIf.onUndoStackChanged, wrapper event undoStackChanged): enough to enable and label own buttons ("Undo Paste").

Example

const listener = new EventAdapter();
listener.onUndoStackChanged = (evt: GeUndoEvent) => {
undoButton.disabled = !evt.canUndo;
undoButton.title = evt.undoLabel ? `Undo ${evt.undoLabel}` : "Undo";
};

Since

1.1.99

Hierarchy

  • GeUndoEvent

Constructors

  • Parameters

    • canUndo: boolean

      a step can be undone

    • canRedo: boolean

      a step can be redone

    • undoLabel: undefined | string

      the label of the step undo takes ("Edit", "Paste" …)

    • redoLabel: undefined | string

      the label of the step redo takes

    • size: number

      steps on the undo stack

    Returns GeUndoEvent

Properties

canRedo: boolean

a step can be redone

canUndo: boolean

a step can be undone

redoLabel: undefined | string

the label of the step redo takes

size: number

steps on the undo stack

undoLabel: undefined | string

the label of the step undo takes ("Edit", "Paste" …)