[]
Interface for undo commands.
// The UndoCommandSupport interface implementation example.
function CustomUndoCommand() { }
CustomUndoCommand.prototype = {
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();
})
}
};
optional name: string;
Optional. The unique name of the command. Used by the undo.skipCommands option setting.
execute(viewer): Promise<void>;
Action implementation.
Promise
<void
>
undo(viewer): Promise<void>;
Undo action implementation.
Promise
<void
>