File

context-dashboard/memento/dashboard-caretaker.service.ts

Description

Caretaker is responsible for undo and redo functionalities.

Index

Methods
Accessors

Constructor

constructor(originator: DashboardOriginatorService)
Parameters :
Name Type Optional
originator DashboardOriginatorService No

Methods

backup
backup()

Adds current dashboard children state to undo stack and clears redo stack.

Returns : void
redo
redo()

Applies previously undone change.

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.

Current state of dashboard children after reverting last change.

Accessors

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.

results matching ""

    No results matching ""