IOptions

[ Interface ]

export interface IOptions {
    centerHorizontal?: boolean;
    centerVertical?: boolean;
    dimBackground?: boolean;
    modal?: boolean;
    closeOnBackground?: boolean;
    resizeCb?: (data: TopMostLayer.IResizeResultObject) => void;
    removeCb?: (data: TopMostLayer.IElemRemoveResultObject) => void;
}

Properties

Name

Type

Description

centerHorizontal [ optional ]

boolean

The element is centered horizontally and held centered when the window is resized.

centerVertical [ optional ]

boolean

The element is centered vertically and held centered when the window is resized.

dimBackground [ optional ]

boolean

Specifies whether the background should be darkened. The default is true.

It is possible to place several elements in the TopMostLayer via add. dimBackground can be different for each element.

modal [ optional ]

boolean

Prevents interaction via the background on other elements. The default is true.

closeOnBackground [ optional ]

Available from version 1.10.1336.404

boolean

Specifies whether the top layer should be closed when interacting (e.g. click or touch action) with the background.

resizeCb [ optional ]

(data: TopMostLayer.IResizeResultObject) => void

Callback which is called when the element has potentially changed in size. A parameter is passed to the callback.

removeCb [ optional ]

(data: TopMostLayer.IElemRemoveResultObject) => void

Callback which is called when the element is removed from the TopMostLayer. A parameter is passed to the callback. This callback is called regardless of the cause of the disconnection.

IOptions 1:

Available from version 1.10