TW.Runtime.Root.Mashup
Oggetto globale della fase di esecuzione. È possibile utilizzare questa API nelle estensioni dei widget e nelle espressioni di mashup all'interno di funzioni e widget.
TW.Runtime.RootMashup.ConfigurationTables
Descrizione
Restituisce tutti i nomi e i valori delle tabelle di configurazione dei mashup in un singolo oggetto. Sono incluse anche tutte le impostazioni per i dispositivi mobili.
Sintassi
TW.Runtime.RootMashup.ConfigurationTables;
Risultato
Un oggetto
// Default Root Mashup Mobile settings are included as well as any other
// Configuration table parameters inf the following format:
{
"id": {
"baseType": "STRING",
"value": "1",
"name": "id",
"description": ""
},
"initialScale": {
"baseType": "NUMBER",
"value": 1,
"name": "initialScale",
"description": "The initial zoom scale when the mashup is loaded for the first time"
},
"heightType": {
"baseType": "STRING",
"value": "device-height",
"name": "heightType",
"description": "Use the height of the device display, or a custom height (in px)"
},
"fullScreenMode": {
"baseType": "BOOLEAN",
"value": true,
"name": "fullScreenMode",
"description": "Open the mashup in full screen mode"
},
"minimumScale": {
"baseType": "NUMBER",
"value": 0.1,
"name": "minimumScale",
"description": "The minimum scale that users can zoom out to"
},
"disableZoom": {
"baseType": "BOOLEAN",
"value": false,
"name": "disableZoom",
"description": "Disables zooming in and out within the mashup"
},
"iosStatusBarAppearance": {
"baseType": "STRING",
"value": "black-translucent",
"name": "iosStatusBarAppearance",
"description": "The style of the iOS status bar"
},
"width": {
"baseType": "STRING",
"value": "device-width",
"name": "width",
"description": "The width of the mashup page"
},
"maximumScale": {
"baseType": "NUMBER",
"value": 10,
"name": "maximumScale",
"description": "The maximum scale that users can zoom out to"
},
"iosShortcutIconTitle": {
"baseType": "STRING",
"value": "",
"name": "iosShortcutIconTitle",
"description": "A title for the mashup shortcut on the iOS home screen"
},
"widthType": {
"baseType": "STRING",
"value": "device-width",
"name": "widthType",
"description": "Use the width of the device display, or a custom width (in px)"
},
"height": {
"baseType": "STRING",
"value": "device-height",
"name": "height",
"description": "The height of the mashup page"
}
}
Parametri
Nessuno
TW.Runtime.RootMashup.CustomMashupCss
Descrizione
Restituisce il CSS personalizzato definito per il mashup radice.
Sintassi
TW.Runtime.RootMashup.CustomMashupCss;
Risultato
Una stringa
Parametri
Nessuno
TW.Runtime.RootMashup.UI
Descrizione
Restituisce la gerarchia dei widget e le coppie di nome e valore delle relative proprietà a partire dal mashup radice.
Sintassi
TW.Runtime.RootMashup.UI;
Risultato
Oggetto con proprietà e una matrice di widget sotto il mashup radice.
|
|
I nomi delle proprietà che iniziano con il tratto di sottolineatura o con la lettera minuscola sono riservati all'uso interno.
|
{
"Properties": {
"Area": "Mashup",
"Style": "DefaultMashupStyle",
"ShowDataLoading": true,
"Visible": true,
"Z-index": 10,
"Id": "mashup-root",
"DisplayName": "Mashup",
"Top": 0,
"Left": 0,
"Type": "mashup",
"Width": 1024,
"Height": 618,
"MinWidth": 0,
"MinHeight": 0,
"IgnoreWarningsInViewMashup": false,
"ResponsiveLayout": true,
"Title": "",
"TitleBar": false,
"TitleBarText": "Gadget Title Here",
"MashupToEditGadget": "DefaultMashupToEditGadget",
"EnableParameterEditing": false,
"Columns": 0,
"Rows": 0,
"TitleBarStyle": "DefaultTitleBarStyle",
"AddToDashboardButtonStyle": "DefaultAddToDashboardButtonStyle",
"ConfigureGadgetButtonStyle": "DefaultConfigureGadgetButtonStyle",
"BGImageRepeat": "no-repeat",
"BGImageSize": "auto",
"IsPrintLayout": false,
"UseThemeForHybrids": false,
"StyleTheme": "PTC Convergence Theme",
"UseMasterTheme": false,
"AddToDashboardButton": "SimplePlus",
"ConfigureGadgetButton": "SimpleGear",
"BGImage": "",
"UseTheme": false,
"Margin": "5",
"StyleProperties": {
}
},
"Widgets": [
{
"Properties": {
"Area": "UI",
"Type": "flexcontainer",
"Margin": "",
"userCannotRemove": true,
"UseTheme": true,
"StyleProperties": {},
"SourceURL": "",
"Style": "DefaultContainerStyle",
"EnableExpandCollapse": false,
"Expanded": true,
"ShowExpandCollapseTab": false,
"ExpandCollapseTabLocation": "inside",
"Overlay": false,
"ResponsiveLayout": true,
"LazyLoading": false,
"EnableContainerUnload": false,
"CollapseTabIcon": "",
"ExpandTabIcon": "",
"ShowDataLoading": true,
"Visible": true,
"Z-index": 10,
"Id": "flexcontainer-2",
"DisplayName": "container-2",
"LastContainer": true,
},
"Widgets": [
{
"Properties": {
...
},
"Widgets": []
},
{
"Properties": {
...
},
"Widgets": []
},
]
}
]
}
Parametri
Nessuno
TW.Runtime.RootMashup.UI
Descrizione
Recupera il nome del mashup radice caricato.
Sintassi
TW.Runtime.RootMashup.mashupName;
Risultato
Una stringa
Parametri
Nessuno