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 collection with an HTML element. | |
options [optional] | Options for extended functionalities. |
Return value
Type | Description |
---|---|
Result as to whether the call was successful |
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
}
}
});