Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UndoRedoManager<T>

Manages undo and redo stacks.

Type parameters

  • T

Hierarchy

  • UndoRedoManager

Index

Accessors

isRedoPossible

  • get isRedoPossible(): boolean
  • Returns true if there are items in the redo stack.

    Returns boolean

isUndoPossible

  • get isUndoPossible(): boolean
  • Returns true if there are items in the undo stack.

    Returns boolean

Methods

addUndoStep

  • addUndoStep(stepData: T): void
  • Adds a step to the undo stack.

    Parameters

    • stepData: T

      data representing a state.

    Returns void

redo

  • redo(): T | undefined
  • Returns most recent item in the redo stack.

    Returns T | undefined

undo

  • undo(): T | undefined
  • Returns data for the previous step in the undo stack and adds last step to the redo stack.

    Returns T | undefined

Generated using TypeDoc