Skip to main content

HistoryManager

HistoryManager

Manages undo/redo actions.


Constructor

public HistoryManager

new HistoryManager()

*Description needed*

Properties

No publicly accessible properties on HistoryManager

private undoStack: Action[]

Description needed

private redoStack: Action[]

Description needed

private disabled: false | true

Description needed

private callbacks: Set<HistoryCallback>

Description needed


Methods

private callback

callback(type, action) => void

Description needed

Parameters

  •  type: "add" | "undo" | "redo" | "reset"Description needed

  •  action: ActionDescription needed

public addCallback

addCallback(callback) => void

Description needed

Parameters

public removeCallback

removeCallback(callback) => void

Description needed

Parameters

public setDisabled

setDisabled(disabled) => void

Description needed

Parameters

  •  disabled: false | trueDescription needed

public add

add(action) => HistoryManager

Add a new action to the undo stack.

Parameters

  •  action: Action – The new action.

Returns

public undo

undo() => HistoryManager

Undo next action and add to redo stack.

Returns

public redo

redo() => HistoryManager

Redo next action and add back to undo stack.

Returns

public reset

reset() => void

Description needed

public getActions

getActions() => Action[]

Description needed

Returns

  •   Action[]Description needed

public getRedoActions

getRedoActions() => Action[]

Description needed

Returns

  •   Action[]Description needed

Static Methods

No static methods for HistoryManager