Skip to main content
Version: 4.3

GraphHistoryOptions

Options for the undo/redo command manager owned by <Diagram history>.

Beyond these options, any single write can be excluded from the undo stack by passing { skipHistory: true } as the setter's metadata (e.g. setCellData(id, updater, { skipHistory: true })) — the command manager drops commands carrying that flag before recording them.

Properties

filterCommand?

readonly optional filterCommand?: (params) => boolean;

Return false to skip a command (it won't be recorded on the undo stack).

Parameters

ParameterType
paramsFilterCommandParams

Returns

boolean


options?

readonly optional options?: Omit<Options, "model" | "graph">;

Escape hatch for dia.CommandManager options not yet exposed as first-level props.


stackLimit?

readonly optional stackLimit?: number;

Maximum number of entries kept on the undo stack. Older commands beyond the limit are dropped.

Default

Infinity

Stay in the know

Be where thousands of diagramming enthusiasts meet

Star us on GitHub