Protected_Protected Optional_Protected_ReadonlyactionsUndo and Redo as actions (registered in viewer.actions, where a UI lists them and the app changes their keys):
Mod+Z undoes, Mod+Shift+Z and Mod+Y redo (Mod: Cmd on a Mac, Ctrl on other platforms). The keys are letters, as
in other apps: they follow the printed key on any layout (the Z key of a German keyboard is at the place of Y). A
held key repeats them. A key typed in a text field is left to the field, for its own text undo; a checkbox or a
button has no text, so the key undoes there. The keys do nothing while the plugin is disabled.
OptionaluiReadonlyundoOptionalundoStatic Optional ReadonlyOldStatic ReadonlyPluginProtected_Protected_Protected_Optionalprefix: stringOptionalmeta: SerializationMetaTypePerforms an action with undo/redo support.
the target object to call the action on
a function that returns - 1. an undo function, 2. an object with undo and redo functions (and optional action)
the arguments to pass to the action function
unique identifier for the command, not really used in actions
OptionalonUndoRedo: (c: ActionUndoCommand) => void
optional callback function to be called on undo/redo of the command. Not called on first action execution, only on undo/redo.
OptionalsetSets a value in the target object with undo/redo support.
a tuple of target object and key to set the value on
the value to set
properties for the undo command, including last, and lastValue(optional)
Optionaluid: any
unique identifier for the command, used to merge commands
OptionalforceOnChange: booleanwhether to track the undo command or not, defaults to true
OptionalonUndoRedo: (c: SetValueUndoCommand) => void
optional callback function to be called on undo/redo of the command
true if the value was set and the command was recorded, false if the command was not recorded (e.g. if it was not undoable or forceOnChange was false)
Optionaluid: anyOptionalforceOnChange: booleanOptionalonUndoRedo: (c: SetValueUndoCommand) => void
UndoManagerPlugin is a plugin for ThreeViewer that provides undo/redo functionality. It uses the JSUndoManager(from ts-browser-helpers) library to maintain a common undo/redo history across the viewer and other plugins.