Manager for undo/redo operations on a JsPlumbToolkit instance. An instance of JsPlumbToolkit creates one of these automatically so there is no need for library users to instantiate one.
export declare class UndoRedoManager
|(constructor)(params)||Constructs a new instance of the |
|clear()||Clears both stacks and fires an update event.|
|edgeChange(previousId, newEdge)||Notification that some edge has been replaced with a copy. This occurs when an edge removed is undone or an edge add is redone. we need to update all references to the previous edge with this new one, as the toolkit no longer knows about the old edge. This is not a method that should be called from outside of the undo manager.|
|redo()||Re-execute the last command in the redo stack, if it isn't empty.|
|transaction(fn, cleanupAction)||Run a series of operations as a single transaction in the undo stack, meaning that they will all be undone/redone at once.|
|undo()||Execute undo on the last command in the undo stack, if it isn't empty.|