Fork me on GitHub

UndoManager

UndoManager

new UndoManager()private

Properties
mathlist : MathAtom[]
stack : object[]

Stack of undo/redo states

index : number

Index pointing to the undo/redo stack

maximumDepth : number

Maximum number of undo/redo states

Methods

canRedo(): booleanprivate

: boolean   

canUndo(): booleanprivate

: boolean   

pop()private

redo()private

restore()

Set the content and selection of the math field to a value previously captured with save() or stored in the undo stack. This does not affect the undo stack.

save()

Return an object capturing the state of the content and selection of the math field. Pass this object to restore() to reset the value of the math field to this saved value. This does not affect the undo stack.

snapshot()private

Push a snapshot of the content and selection of the math field onto the undo stack so that it can potentially be reverted to later.

snapshotAndCoalesce(options: [any])

options : [any]

undo()private