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(); }) }} Copy
// 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(); }) }}
Action implementation.
Undo action implementation.
Optional. The unique name of the command. Used by the undo.skipCommands option setting.
Interface for undo commands.
Example