UI: Add font and color for water level symbols
This commit is contained in:
parent
e1d11c913a
commit
0eff9cb380
@ -43,7 +43,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"tag": "label",
|
"tag": "label",
|
||||||
"stateRenderFunction": "var label = ctx.properties.label;\nif (label) {\n var icon = ctx.properties.icon;\n ctx.api.text(element, ctx.properties.labelText);\n if (!icon) {\n element.transform({translateX: 10});\n }\n element.show();\n} else {\n element.hide();\n}",
|
"stateRenderFunction": "var label = ctx.properties.label;\nif (label) {\n var icon = ctx.properties.icon;\n var labelTextFont = ctx.properties.labelTextFont;\n var labelTextColor = ctx.properties.labelTextColor;\n ctx.api.font(element, labelTextFont, labelTextColor);\n ctx.api.text(element, ctx.properties.labelText);\n if (!icon) {\n element.transform({translateX: 10});\n }\n element.show();\n} else {\n element.hide();\n}",
|
||||||
"actions": null
|
"actions": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -315,6 +315,44 @@
|
|||||||
"max": null,
|
"max": null,
|
||||||
"step": null
|
"step": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "labelTextFont",
|
||||||
|
"name": "{i18n:scada.symbol.label}",
|
||||||
|
"type": "font",
|
||||||
|
"default": {
|
||||||
|
"size": 13,
|
||||||
|
"sizeUnit": "px",
|
||||||
|
"family": "Roboto",
|
||||||
|
"weight": "500",
|
||||||
|
"style": "normal"
|
||||||
|
},
|
||||||
|
"required": null,
|
||||||
|
"subLabel": null,
|
||||||
|
"divider": null,
|
||||||
|
"fieldSuffix": null,
|
||||||
|
"disableOnProperty": "label",
|
||||||
|
"rowClass": "",
|
||||||
|
"fieldClass": "",
|
||||||
|
"min": null,
|
||||||
|
"max": null,
|
||||||
|
"step": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "labelTextColor",
|
||||||
|
"name": "{i18n:scada.symbol.label}",
|
||||||
|
"type": "color",
|
||||||
|
"default": "#0000008A",
|
||||||
|
"required": null,
|
||||||
|
"subLabel": null,
|
||||||
|
"divider": null,
|
||||||
|
"fieldSuffix": null,
|
||||||
|
"disableOnProperty": "label",
|
||||||
|
"rowClass": "",
|
||||||
|
"fieldClass": "",
|
||||||
|
"min": null,
|
||||||
|
"max": null,
|
||||||
|
"step": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "icon",
|
"id": "icon",
|
||||||
"name": "{i18n:scada.symbol.icon}",
|
"name": "{i18n:scada.symbol.icon}",
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 55 KiB |
@ -43,7 +43,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"tag": "label",
|
"tag": "label",
|
||||||
"stateRenderFunction": "var label = ctx.properties.label;\nif (label) {\n var icon = ctx.properties.icon;\n ctx.api.text(element, ctx.properties.labelText);\n if (!icon) {\n element.transform({translateX: 10});\n }\n element.show();\n} else {\n element.hide();\n}",
|
"stateRenderFunction": "var label = ctx.properties.label;\nif (label) {\n var icon = ctx.properties.icon;\n var labelTextFont = ctx.properties.labelTextFont;\n var labelTextColor = ctx.properties.labelTextColor;\n ctx.api.font(element, labelTextFont, labelTextColor);\n ctx.api.text(element, ctx.properties.labelText);\n if (!icon) {\n element.transform({translateX: 10});\n }\n element.show();\n} else {\n element.hide();\n}",
|
||||||
"actions": null
|
"actions": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -315,6 +315,44 @@
|
|||||||
"max": null,
|
"max": null,
|
||||||
"step": null
|
"step": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "labelTextFont",
|
||||||
|
"name": "{i18n:scada.symbol.label}",
|
||||||
|
"type": "font",
|
||||||
|
"default": {
|
||||||
|
"size": 13,
|
||||||
|
"sizeUnit": "px",
|
||||||
|
"family": "Roboto",
|
||||||
|
"weight": "500",
|
||||||
|
"style": "normal"
|
||||||
|
},
|
||||||
|
"required": null,
|
||||||
|
"subLabel": null,
|
||||||
|
"divider": null,
|
||||||
|
"fieldSuffix": null,
|
||||||
|
"disableOnProperty": "label",
|
||||||
|
"rowClass": "",
|
||||||
|
"fieldClass": "",
|
||||||
|
"min": null,
|
||||||
|
"max": null,
|
||||||
|
"step": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "labelTextColor",
|
||||||
|
"name": "{i18n:scada.symbol.label}",
|
||||||
|
"type": "color",
|
||||||
|
"default": "#0000008A",
|
||||||
|
"required": null,
|
||||||
|
"subLabel": null,
|
||||||
|
"divider": null,
|
||||||
|
"fieldSuffix": null,
|
||||||
|
"disableOnProperty": "label",
|
||||||
|
"rowClass": "",
|
||||||
|
"fieldClass": "",
|
||||||
|
"min": null,
|
||||||
|
"max": null,
|
||||||
|
"step": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "icon",
|
"id": "icon",
|
||||||
"name": "{i18n:scada.symbol.icon}",
|
"name": "{i18n:scada.symbol.icon}",
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 55 KiB |
Loading…
x
Reference in New Issue
Block a user