Skip to content
EliteChart

HistoryStackOptions

Documentation


Documentation / @elitechart/core / HistoryStackOptions

Defined in: history/history-stack.ts:57

Constructor options for HistoryStack.

Example

code
const stack = new HistoryStack({
  maxEntries: 100,
  onChange: (s) => updateUndoButton(s.canUndo),
});

Properties

maxEntries?

code
readonly optional maxEntries?: number;

Defined in: history/history-stack.ts:59

Maximum undoable commands. Oldest are evicted when exceeded. Default 200.


onChange?

code
readonly optional onChange?: (state) => void;

Defined in: history/history-stack.ts:61

Called when the stack state changes (undo/redo availability).

Parameters

state

HistoryState

Returns

void