Document Solutions Image Viewer
    Preparing search index...

    Interface UndoCommandSupport

    Interface for undo commands.

    // The UndoCommandSupport interface implementation example.
    class CustomUndoCommand implements UndoCommandSupport {
    name: "CustomUndoCommand",
    execute: function(viewer) {
    return new Promise((resolve) => {
    // Put your action code here
    resolve();
    })
    },
    undo: function(viewer) {
    return new Promise((resolve) => {
    // Put your undo action here
    resolve();
    })
    }
    }
    interface UndoCommandSupport {
        name: string;
        execute(viewer: ImageViewerAPI): Promise<void>;
        undo(viewer: ImageViewerAPI): Promise<void>;
    }

    Implemented by

    Methods

    Properties

    name: string

    Optional. The unique name of the command. Used by the undo.skipCommands option setting.