Document Solutions Image Viewer
    Preparing search index...

    Interface UndoStorage

    Command based undo state storage.

    interface UndoStorage {
        hasUndo: boolean;
        hasRedo: boolean;
        undoIndex: number;
        undoCount: number;
        undoInProgress: boolean;
        applyOptions(options: ViewerOptions): void;
        dispose(): void;
        clear(): void;
        isCommandSupported(command: UndoCommandSupport): boolean;
        execute(command: UndoCommandSupport): Promise<void>;
        onCommandExecuted(command: UndoCommandSupport): void;
        undo(): Promise<void>;
        redo(): Promise<void>;
    }

    Methods

    • Dispose undo storage.

      Returns void

    • Clear undo storage.

      Returns void

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

      Parameters

      Returns boolean

    • Undo last action.

      Returns Promise<void>

    • Redo next action.

      Returns Promise<void>

    Properties

    hasUndo: boolean

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

    hasRedo: boolean

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

    undoIndex: number

    Gets current undo level index.

    undoCount: number

    Gets total undo levels count.

    undoInProgress: boolean

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