TW.Runtime.Root.Mashup
Objet d'exécution global. Vous pouvez utiliser cette API dans les extensions de widget et dans les expressions d'application composite des fonctions et des widgets.
TW.Runtime.RootMashup.ConfigurationTables
Description
Renvoie tous les noms et valeurs des tables de configuration d'application composite dans un objet unique. Tous les paramètres mobiles sont également inclus.
Syntaxe
TW.Runtime.RootMashup.ConfigurationTables;
Retour
Objet
// 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"
}
}
Paramètres
Aucun
TW.Runtime.RootMashup.CustomMashupCss
Description
Renvoie la CSS personnalisée définie pour l'application composite racine.
Syntaxe
TW.Runtime.RootMashup.CustomMashupCss;
Retour
Chaîne
Paramètres
Aucun
TW.Runtime.RootMashup.UI
Description
Renvoie la hiérarchie des widgets et leurs paires nom de propriété/valeur, en commençant par l'application composite racine.
Syntaxe
TW.Runtime.RootMashup.UI;
Retour
Objet avec les propriétés et tableau de widgets sous l'application composite racine.
* 
Les noms de propriété commençant par un trait de soulignement ou une lettre minuscule sont réservés à un usage interne uniquement.
{
"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": []
},
]
}
]
}
Paramètres
Aucun
TW.Runtime.RootMashup.UI
Description
Récupère le nom de l'application composite racine chargée.
Syntaxe
TW.Runtime.RootMashup.mashupName;
Retour
Chaîne
Paramètres
Aucun
Est-ce que cela a été utile ?