UI: Fixed position for icon SCADA analog meters
This commit is contained in:
		
							parent
							
								
									9e10d9e5ae
								
							
						
					
					
						commit
						31d85bb685
					
				@ -37,7 +37,7 @@
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "tag": "icon",
 | 
			
		||||
      "stateRenderFunction": "var showIcon = ctx.properties.showIcon;\nif (showIcon) {\n    element.show();\n    var icon = ctx.properties.icon;\n    var iconSize = ctx.properties.iconSize;\n    var iconColor = ctx.properties.iconColor;\n    ctx.api.icon(element, icon, iconSize, iconColor, true);\n} else {\n    element.hide()\n}",
 | 
			
		||||
      "stateRenderFunction": "var showIcon = ctx.properties.showIcon;\nvar showLabel = ctx.properties.label;\nif (showIcon) {\n    element.show();\n    var icon = ctx.properties.icon;\n    var iconSize = ctx.properties.iconSize;\n    var iconColor = ctx.properties.iconColor;\n    ctx.api.icon(element, icon, iconSize, iconColor, true);\n    if (!showLabel) {\n        element.transform({translateX: 83,translateY: 137});\n    }\n} else {\n    element.hide()\n}\n",
 | 
			
		||||
      "actions": null
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
| 
		 Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB  | 
@ -37,7 +37,7 @@
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "tag": "icon",
 | 
			
		||||
      "stateRenderFunction": "var showIcon = ctx.properties.showIcon;\nif (showIcon) {\n    element.show();\n    var icon = ctx.properties.icon;\n    var iconSize = ctx.properties.iconSize;\n    var iconColor = ctx.properties.iconColor;\n    ctx.api.icon(element, icon, iconSize, iconColor, true);\n} else {\n    element.hide()\n}",
 | 
			
		||||
      "stateRenderFunction": "var showIcon = ctx.properties.showIcon;\nvar showLabel = ctx.properties.label;\nif (showIcon) {\n    element.show();\n    var icon = ctx.properties.icon;\n    var iconSize = ctx.properties.iconSize;\n    var iconColor = ctx.properties.iconColor;\n    ctx.api.icon(element, icon, iconSize, iconColor, true);\n    if (!showLabel) {\n        element.transform({translateX: 119, translateY: 137});\n    }\n} else {\n    element.hide()\n}",
 | 
			
		||||
      "actions": null
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
| 
		 Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB  | 
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user