[]
        
(Showing Draft Content)

UndoStorage

Interface: UndoStorage

Command based undo state storage.

Properties

hasUndo

readonly hasUndo: boolean;

Gets a value indicating whether the undo storage can undo changes.


hasRedo

readonly hasRedo: boolean;

Gets a value indicating whether the undo storage can redo changes.


undoIndex

readonly undoIndex: number;

Gets current undo level index.


undoCount

readonly undoCount: number;

Gets total undo levels count.


undoInProgress

readonly undoInProgress: boolean;

Gets a flag indicating whether an undo/redo or execute operation is in progress.

Methods

applyOptions()

applyOptions(options): void;

Apply undo storage options.

Parameters

options

ViewerOptions

Returns

void


dispose()

dispose(): void;

Dispose undo storage.

Returns

void


clear()

clear(): void;

Clear undo storage.

Returns

void


isCommandSupported()

isCommandSupported(command): boolean;

Gets a value indicating whether the command specified in the command parameter is supported.

Parameters

command

UndoCommandSupport

Instance of a command.

Returns

boolean


execute()

execute(command): Promise<void>;

Execute a new command.

Parameters

command

UndoCommandSupport

Instance of a command.

Returns

Promise<void>


onCommandExecuted()

onCommandExecuted(command): void;

Called after command action has been executed.

Parameters

command

UndoCommandSupport

Instance of a command.

Returns

void


undo()

undo(): Promise<void>;

Undo last action.

Returns

Promise<void>


redo()

redo(): Promise<void>;

Redo next action.

Returns

Promise<void>