TW.Runtime.Root.Mashup
Un objeto global en tiempo de ejecución. Esta API se puede utilizar en extensiones de widget y en expresiones de mashup dentro de funciones y widgets.
TW.Runtime.RootMashup.ConfigurationTables
Descripción
Se devuelven todos los nombres y valores de la tabla de configuración de mashup en un único objeto. Esto también incluye todas las configuraciones de móvil.
Sintaxis
TW.Runtime.RootMashup.ConfigurationTables;
Devolución
Un objeto
// 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"
}
}
Parámetros
Ninguno
TW.Runtime.RootMashup.CustomMashupCss
Descripción
Se devuelve la CSS personalizada definida para el mashup raíz.
Sintaxis
TW.Runtime.RootMashup.CustomMashupCss;
Devolución
Una cadena
Parámetros
Ninguno
TW.Runtime.RootMashup.UI
Descripción
Se devuelven la jerarquía de widgets y sus pares de nombre, así como el valor de propiedad, empezando por el mashup raíz.
Sintaxis
TW.Runtime.RootMashup.UI;
Devolución
Un objeto con propiedades y una matriz de widgets en el mashup raíz.
|
|
Los nombres de propiedad que empiezan por un guion bajo o letra en minúscula están reservados solo para 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": []
},
]
}
]
}
Parámetros
Ninguno
TW.Runtime.RootMashup.UI
Descripción
Se recupera el nombre del mashup raíz cargado.
Sintaxis
TW.Runtime.RootMashup.mashupName;
Devolución
Una cadena
Parámetros
Ninguno