WhiteboardHistory
Class that stores the changes made in the whiteboard and allows you to get the shapes that undo the changes introduced in the whiteboard. As long as no new changes are introduced this class also allows to obtain the shapes that reverts the changes made (redo action).
Constructor Summary
Public Constructor | ||
public |
|
Method Summary
Public Methods | ||
public |
Add a new shape state to the history. |
|
public |
Check if there are items stored in the history that can be used to redo an action. |
|
public |
Check if there are items stored in the history can be used to undo an action. |
|
public |
clear() Reset the history. |
|
public |
Get a shape that can be used to revert last undo action. |
|
public |
Get a shape that can be used to undo last added shape. |
Public Constructors
public constructor() source
Public Methods
public add(shape: Object) source
Add a new shape state to the history.
Params:
Name | Type | Attribute | Description |
shape | Object | the new state of the shape. |
public canRedo(): boolean source
Check if there are items stored in the history that can be used to redo an action.
public canUndo(): boolean source
Check if there are items stored in the history can be used to undo an action.