[]
        
(Showing Draft Content)

IUndoStorage

Document Solutions Image Viewer - v7.2.0 / IUndoStorage

Interface: IUndoStorage

Command based undo state storage.

Implemented by

Table of contents

Methods

Accessors

Methods

applyOptions

applyOptions(options): any

Apply undo storage options.

Parameters

Name Type
options ViewerOptions

Returns

any


dispose

dispose(): any

Dispose undo storage.

Returns

any


clear

clear(): any

Clear undo storage.

Returns

any


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


execute

execute(command): Promise<void>

Execute a new command.

Parameters

Name Type Description
command UndoCommandSupport Instance of a command.

Returns

Promise<void>


onCommandExecuted

onCommandExecuted(command): any

Called after command action has been executed.

Parameters

Name Type
command UndoCommandSupport

Returns

any


undo

undo(): Promise<void>

Undo last action.

Returns

Promise<void>


redo

redo(): Promise<void>

Redo next action.

Returns

Promise<void>

Accessors

hasUndo

get hasUndo(): boolean

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

Returns

boolean


hasRedo

get hasRedo(): boolean

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

Returns

boolean


undoIndex

get undoIndex(): number

Gets current undo level index.

Returns

number


undoCount

get undoCount(): number

Gets total undo levels count.

Returns

number


undoInProgress

get undoInProgress(): boolean

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

Returns

boolean