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()private

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

save()private

Return an object capturing the state of the content and selection of the mathfield. 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 mathfield onto the undo stack so that it can potentially be reverted to later.

snapshotAndCoalesce(options: [any])private

options : [any]

undo()private