Skip to main content

Interface: CommandBatch

Defined in: src/diagram/history.ts:228

Provide the means to store or discard command batch.

See

CommandHistory.startBatch

Properties

PropertyModifierTypeDescription

history

readonly

CommandHistory

Command history which owns this batch.

Methods

discard()

discard(options?): void

Defined in: src/diagram/history.ts:244

Discards the batch, throwing away or reverting all nested commands.

Omitting revert or setting it to false is useful when performing transient state changes on temporary items to avoid being able to revert it.

Parameters

ParameterTypeDescription

options?

{ revert?: boolean; }

options.revert?

boolean

When set to true reverts all nested commands in the batch instead of throwing them away.

Default

false

Returns

void


store()

store(): void

Defined in: src/diagram/history.ts:237

Stores the batch, combining the nested command sequence into a single revertible command.

Returns

void