UndoRedoExtension Class

A Web Dashboard extension that allows you to keep track of all user actions, and cancel or repeat them.

Declaration

export class UndoRedoExtension extends DisposableObject

Impemented Interfaces

Inheritance

Constructor

Initializes a new instance of the UndoRedoExtension class.

Declaration

constructor(dashboardControl: DashboardControl)

Parameters

Type Name Description
DashboardControl dashboardControl

A Web Dashboard control that owns the extension.

Properties

isChanged property

Specifies whether the Web Dashboard has unsaved changes.

Declaration

isChanged: KnockoutComputed<boolean>

Property Value

Type Description
KnockoutComputed<boolean>

true, if the dashboard has unsaved changes; otherwise, false.

name property

Specifies a unique extension name.

Declaration

name: string

Property Value

Type Description
string

A unique extension name. The return value is 'undo-redo'.

Warning

Do not change a unique name of the extension registered in the Web Dashboard in order to avoid exceptions.

Methods

processKeyEvent method

Allows you to process which key was pressed.

Declaration

processKeyEvent(keyEventType: KeyEventType, eventArgs: JQueryKeyEventObject): boolean

Parameters

Type Name Description
KeyEventType keyEventType

The KeyEventType object that identifies a user interaction with the keyboard.

JQueryKeyEventObject eventArgs

A <xref:JQueryKeyEventObject> object that identifies a key.

Returns

Type Description
boolean

true, if a key used to undo the operation; otherwise, false.

redo method

Declaration

redo(): void

redoEnabled method

Declaration

redoEnabled(): boolean

Returns

Type Description
boolean

reset method

Declaration

reset(): void

start method

Contains code that is executed when you register the dashboard extension.

Declaration

start(): void

stop method

Contains code that is executed when you unregister the dashboard extension.

Declaration

stop(): void

undo method

Declaration

undo(): void

undoEnabled method

Declaration

undoEnabled(): boolean

Returns

Type Description
boolean