[]
        
(Showing Draft Content)

UndoStorage

Document Solutions Image Viewer - v8.0.0 / UndoStorage

Class: UndoStorage

Command based undo state storage.

Implements

Table of contents

Methods

Accessors

Methods

applyOptions

applyOptions(options): void

Apply undo storage options.

Parameters

Name Type
options ViewerOptions

Returns

void

Implementation of

IUndoStorage.applyOptions


dispose

dispose(): void

Dispose undo storage.

Returns

void

Implementation of

IUndoStorage.dispose


clear

clear(): void

Clear undo storage.

Returns

void

Implementation of

IUndoStorage.clear


isCommandSupported

isCommandSupported(command): boolean

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

Parameters

Name Type
command UndoCommandSupport

Returns

boolean

Implementation of

IUndoStorage.isCommandSupported


execute

execute(command): Promise<void>

Execute a new command.

Parameters

Name Type Description
command UndoCommandSupport Instance of a command.

Returns

Promise<void>

Implementation of

IUndoStorage.execute


onCommandExecuted

onCommandExecuted(command): void

Called after command action has been executed.

Parameters

Name Type
command UndoCommandSupport

Returns

void

Implementation of

IUndoStorage.onCommandExecuted


undo

undo(): Promise<void>

Undo last action.

Returns

Promise<void>

Implementation of

IUndoStorage.undo


redo

redo(): Promise<void>

Redo next action.

Returns

Promise<void>

Implementation of

IUndoStorage.redo

Accessors

hasUndo

get hasUndo(): boolean

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

Returns

boolean

Implementation of

IUndoStorage.hasUndo


hasRedo

get hasRedo(): boolean

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

Returns

boolean

Implementation of

IUndoStorage.hasRedo


undoIndex

get undoIndex(): number

Gets current undo level index.

Returns

number

Implementation of

IUndoStorage.undoIndex


undoCount

get undoCount(): number

Gets total undo levels count.

Returns

number

Implementation of

IUndoStorage.undoCount


undoInProgress

get undoInProgress(): boolean

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

Returns

boolean

Implementation of

IUndoStorage.undoInProgress