Skip to main content
A newer version of this page is available. .

MobileLayoutExtension Class

A Web Dashboard extension that allows you to enable a mobile layout for phones.

Declaration

export class MobileLayoutExtension implements IExtension

Remarks

When registered, the MobileLayoutExtension allows you to use a mobile layout to display your dashboards on mobile phones. The Web Dashboard supports a mobile layout when operates in the Viewer and ViewerOnly modes.

To disable a mobile layout, call the unregisterExtension(extensionNames) method and pass the extension’s unique name as a parameter:

dashboardControl.unregisterExtension('mobile-layout');

To learn more about a mobile layout, see Mobile Layout.

See the Extensions Overview section for information on how to use the HTML JavaScript Dashboard’s client-side API.

Implements

constructor(dashboardControl)

Initializes a new instance of the MobileLayoutExtension class.

Declaration

constructor(
    dashboardControl: DashboardControl,
    options?: MobileLayoutExtensionOptions
)

Parameters

Name Type Description
dashboardControl DashboardControl

A Web Dashboard control that owns the extension.

options MobileLayoutExtensionOptions

A MobileLayoutExtensionOptions object providing access to the MobileLayoutExtension options.

Properties

mobileLayoutEnabled Property

Gets whether a mobile layout is enabled for the current Web Dashboard control.

Declaration

mobileLayoutEnabled: ko.Computed<boolean>

Property Value

Type
Computed<boolean>

Remarks

To learn more about a mobile layout, see Mobile Layout.

name Property

Specifies The unique extension name.

Declaration

name: string

Property Value

Type Description
string

The unique extension name. The return value is ‘mobile-layout’.

Remarks

Warning

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

Methods

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