context-dashboard/memento/dashboard-caretaker.service.ts
Caretaker is responsible for undo and redo functionalities.
Methods |
Accessors |
constructor(originator: DashboardOriginatorService)
|
||||||
Parameters :
|
backup |
backup()
|
Adds current dashboard children state to undo stack and clears redo stack.
Returns :
void
|
redo |
redo()
|
Applies previously undone change.
Returns :
DashboardChildrenState | undefined
Current state of dashboard children after applying previously undone change. |
reset |
reset()
|
Clears both undo and redo stack, sets current state as initial state and returns initial state.
Returns :
any
Initial state of dashboard children. |
undo |
undo()
|
Reverts last dashboard children change and puts it in redo stack.
Returns :
DashboardChildrenState | undefined
Current state of dashboard children after reverting last change. |
undoStackLength |
getundoStackLength()
|
Current undo stack length for defining undo button disable state.
Returns :
number
|
redoStackLastItem |
getredoStackLastItem()
|
Redo stack latest item for defining redo button disable state and its' title.
Returns :
DashboardChildrenState
|