addEx

[ Function ]

public static addEx(
    element: JQuery | undefined | null,
    options?: TopMostLayer.IOptions
): boolean;

Inserts an HTML element into the overlay area above the normal visualization. This function is intended for use from Code-behind.

A reference to the element should be saved in order to be able to call the removeEx() function.

Parameter

Name

Type

Description

element

JQuery

JQuery collection with an HTML element.

options [optional]

TopMostLayer.IOptions

Options for extended functionalities.

Return value

Type

Description

boolean

Result as to whether the call was successful

addEx 1:

Available from version 1.10

Sample - JavaScript

var myPopup = $('<div style="background:white;padding:10px;">Hello World</div>');
TcHmi.TopMostLayer.addEx(myPopup, {
    centerHorizontal: true,
    centerVertical: true,
    removeCb: (data) => {
        if (data.canceled) {
            // user clicked on background
        }
    }
});