History manager API overview
A set of APIs that you can use for managing the history of actions in the Diagram Editor. Use the history keyword to access the History manager via the editor object:
const editor = new dhx.DiagramEditor("editor_container", {
type: "default" // only default
});
// ...
editor.history.redo(); // restores an action that has been reverted by the Undo action
History manager methods overview
| Name | Description |
|---|---|
| add() | Adds a new state |
| disable() | Blocks HistoryManager |
| enable() | Restarts the work of HistoryManager, saving the current state as initial state |
| isRedo() | Checks whether an action reverted by the Undo action has been restored |
| isUndo() | Checks whether an action has been reverted |
| redo() | Restores an action that has been reverted by the Undo action |
| reset() | Resets previous changes and saves the current state |
| undo() | Reverts the last action in the Diagram Editor |
History manager properties overview
| Name | Description |
|---|---|
| saveDelay | Sets the time interval for saving the current state in ms |