zoom and rotation on overview

This commit is contained in:
Salijoghli 2025-09-30 18:55:01 +04:00
parent e8faccb9d4
commit 9fc4d1ce9f
34 changed files with 2254 additions and 1136 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,79 @@
{
"custom": {},
"params": {},
"props": {
"defaultSize": {
"height": 1080,
"width": 1920
}
},
"root": {
"children": [
{
"meta": {
"name": "EmbeddedView"
},
"position": {
"height": 1,
"width": 1
},
"props": {
"params": {
"controls": {
"click": true,
"in": true,
"out": true,
"pan": true,
"reset": true,
"zoom": true
},
"panning": true,
"viewParams": {
"highlightTagPath": "value"
},
"viewPath": "autStand/Overview/Overview-No-Zoom"
},
"path": "autStand/Custom_Views/View-Scaler"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "EmbeddedView_0"
},
"position": {
"height": 0.0516,
"width": 0.0935,
"x": 0.7505,
"y": 0.0416
},
"props": {
"path": "autStand/Custom_Views/Global-Start"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "EmbeddedView_1"
},
"position": {
"height": 0.0516,
"width": 0.0935,
"x": 0.8484,
"y": 0.0416
},
"props": {
"path": "autStand/Custom_Views/Global-Stop"
},
"type": "ia.display.view"
}
],
"meta": {
"name": "root"
},
"props": {
"mode": "percent"
},
"type": "ia.container.coord"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 953 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -585,7 +585,7 @@
},
"props": {
"dismissOnSelect": false,
"formattedValue": "Sep 30, 2025 8:15 AM",
"formattedValue": "Sep 30, 2025 10:17 AM",
"formattedValues": {
"date": "Mar 26, 2021",
"datetime": "Mar 26, 2021 12:00 AM",
@ -603,9 +603,9 @@
"$": [
"ts",
192,
1759234527871
1759241850950
],
"$ts": 1759205727000
"$ts": 1759213050000
}
},
"type": "ia.input.date-time-input"
@ -756,7 +756,7 @@
},
"props": {
"dismissOnSelect": false,
"formattedValue": "Sep 30, 2025 4:15 PM",
"formattedValue": "Sep 30, 2025 6:17 PM",
"formattedValues": {
"date": "Mar 29, 2021",
"datetime": "Mar 29, 2021 1:37 PM",
@ -774,9 +774,9 @@
"$": [
"ts",
192,
1759234527871
1759241850968
],
"$ts": 1759234527000
"$ts": 1759241850000
}
},
"type": "ia.input.date-time-input"

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -5052,32 +5052,6 @@
"type": "property"
}
},
"props.mode": {
"binding": {
"config": {
"path": "this.custom.rotation"
},
"transforms": [
{
"fallback": "percent",
"inputType": "scalar",
"mappings": [
{
"input": "90deg",
"output": "fixed"
},
{
"input": "270deg",
"output": "fixed"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
},
"props.style.marginTop": {
"binding": {
"config": {
@ -5088,6 +5062,7 @@
}
},
"props": {
"mode": "percent",
"style": {
"overflow": "visible"
}

View File

@ -264,6 +264,9 @@
"type": "ia.container.flex"
},
{
"custom": {
"area": ""
},
"meta": {
"name": "Label"
},
@ -272,42 +275,16 @@
"shrink": 0
},
"propConfig": {
"custom.area": {
"binding": {
"config": {
"expression": "if(isNull({this.custom.lookup_path}), \"\",\r\ntry(jsonGet({this.custom.plc_dict},\"Area\"),\"\"))"
},
"type": "expr"
}
},
"custom.lookup_path": {
"binding": {
"config": {
"expression": "try(if({this.custom.path}[1,0]\u003d\"DetailedView\", {this.custom.path}[2,0],\r\n\"\"), \"\")\r\n"
},
"type": "expr"
}
},
"custom.path": {
"binding": {
"config": {
"path": "page.props.path"
},
"transforms": [
{
"expression": "split({value},\"/\")",
"type": "expression"
}
],
"type": "property"
}
},
"custom.path_to_display": {
"binding": {
"config": {
"expression": "if(len({this.custom.lookup_path})\u003c1, \"\",\r\nif(len({this.custom.area}) \u003c1, {this.custom.lookup_path},\r\nif(len({this.custom.sub_area}) \u003e 0, concat({this.custom.lookup_path} + \" / \" + {this.custom.area} + \" / \" + {this.custom.sub_area}),\r\nconcat({this.custom.lookup_path} + \" / \" + {this.custom.area}))))"
"expression": "{page.props.path}"
},
"type": "expr"
},
"onChange": {
"enabled": null,
"script": "\t# get the last part of the path\n\tmcm_key \u003d str(currentValue.value).split(\u0027/\u0027)[-1]\n\tself.custom.area \u003d mcm_key\n\tsystem.perspective.print(mcm_key)\n\n#\t# get the JSON from the custom property\n#\tjson_data \u003d self.custom.plc_dict\n#\t\n#\t# lookup the Area value\n#\tarea_value \u003d json_data.get(mcm_key, {}).get(\"Area\", \"Unknown\")\n#\t\n#\t# debug prints\n#\tsystem.perspective.print(mcm_key)\n#\tsystem.perspective.print(area_value)\n\t\n\t# write result to another property (e.g., Label.props.text)\n#\tself.getSibling(\"Label\").props.text \u003d \"{mcm_key} - {area_value}\""
}
},
"custom.plc_dict": {
@ -320,23 +297,9 @@
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC"
},
"transforms": [
{
"expression": "jsonGet({value},{this.custom.lookup_path})",
"type": "expression"
}
],
"type": "tag"
}
},
"custom.sub_area": {
"binding": {
"config": {
"expression": "if(isNull({this.custom.lookup_path}), \"\",\r\ntry(jsonGet({this.custom.plc_dict},\"SubArea\"), \"\"))"
},
"type": "expr"
}
},
"position.display": {
"binding": {
"config": {
@ -348,7 +311,7 @@
"props.text": {
"binding": {
"config": {
"path": "this.custom.path_to_display"
"path": "this.custom.area"
},
"type": "property"
}

View File

@ -9,8 +9,8 @@
"attributes": {
"lastModification": {
"actor": "admin",
"timestamp": "2025-09-29T13:52:16Z"
"timestamp": "2025-09-30T13:10:30Z"
},
"lastModificationSignature": "52f13e0e3f755c4ef7d1d1bda49fcf6e8b1b8f6a8e73a1359a664d4464ec1be9"
"lastModificationSignature": "63bf6d7d5f388d1a2c3e823c7e71390139e77cd4268798e4251078cb94e8bcaa"
}
}

View File

@ -10,8 +10,8 @@
"attributes": {
"lastModification": {
"actor": "admin",
"timestamp": "2025-09-29T15:18:03Z"
"timestamp": "2025-09-30T14:50:24Z"
},
"lastModificationSignature": "8b14b8dac16b1335d86cf85d044d3f10d03dfbd2c444629d68a5f3af63e5d427"
"lastModificationSignature": "6c3bbc1fd97bc7504541fe018dee255fef567c732df15a020e2e691618dd91ea"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View File

@ -10,8 +10,8 @@
"attributes": {
"lastModification": {
"actor": "admin",
"timestamp": "2025-09-30T10:04:26Z"
"timestamp": "2025-09-30T14:50:23Z"
},
"lastModificationSignature": "2af86e1ba083d753871fa1f4b1614576168a189ec6b043b7948a0d480b43fa4f"
"lastModificationSignature": "cce739592e2d679f1c13c756c2373387402009be88ec55c43ce7c5dff075f1aa"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 62 KiB

View File

@ -5052,32 +5052,6 @@
"type": "property"
}
},
"props.mode": {
"binding": {
"config": {
"path": "this.custom.rotation"
},
"transforms": [
{
"fallback": "percent",
"inputType": "scalar",
"mappings": [
{
"input": "90deg",
"output": "fixed"
},
{
"input": "270deg",
"output": "fixed"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
},
"props.style.marginTop": {
"binding": {
"config": {
@ -5088,6 +5062,7 @@
}
},
"props": {
"mode": "percent",
"style": {
"overflow": "visible"
}

View File

@ -10,8 +10,8 @@
"attributes": {
"lastModification": {
"actor": "admin",
"timestamp": "2025-09-26T10:04:42Z"
"timestamp": "2025-09-30T12:20:10Z"
},
"lastModificationSignature": "b999a708c31aa14b6570f1e283f93f2a8bb297bd02ddd9464a9f257241a1c84f"
"lastModificationSignature": "f0285d48532680cebabbb90ce25719f9e1916cb8c9f5d00be86587f95df91307"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -10,8 +10,8 @@
"attributes": {
"lastModification": {
"actor": "admin",
"timestamp": "2025-09-29T14:43:17Z"
"timestamp": "2025-09-30T14:17:31Z"
},
"lastModificationSignature": "a24afddb67821ef84448eeda2304112da26cb750bbcad1a7b7d81775573fc69f"
"lastModificationSignature": "7390e7d18dc222f1e255bc253be51e20f72d6775dbddc9ce60aca987a6ebbd31"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 953 B

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -264,6 +264,9 @@
"type": "ia.container.flex"
},
{
"custom": {
"area": ""
},
"meta": {
"name": "Label"
},
@ -272,42 +275,16 @@
"shrink": 0
},
"propConfig": {
"custom.area": {
"binding": {
"config": {
"expression": "if(isNull({this.custom.lookup_path}), \"\",\r\ntry(jsonGet({this.custom.plc_dict},\"Area\"),\"\"))"
},
"type": "expr"
}
},
"custom.lookup_path": {
"binding": {
"config": {
"expression": "try(if({this.custom.path}[1,0]\u003d\"DetailedView\", {this.custom.path}[2,0],\r\n\"\"), \"\")\r\n"
},
"type": "expr"
}
},
"custom.path": {
"binding": {
"config": {
"path": "page.props.path"
},
"transforms": [
{
"expression": "split({value},\"/\")",
"type": "expression"
}
],
"type": "property"
}
},
"custom.path_to_display": {
"binding": {
"config": {
"expression": "if(len({this.custom.lookup_path})\u003c1, \"\",\r\nif(len({this.custom.area}) \u003c1, {this.custom.lookup_path},\r\nif(len({this.custom.sub_area}) \u003e 0, concat({this.custom.lookup_path} + \" / \" + {this.custom.area} + \" / \" + {this.custom.sub_area}),\r\nconcat({this.custom.lookup_path} + \" / \" + {this.custom.area}))))"
"expression": "{page.props.path}"
},
"type": "expr"
},
"onChange": {
"enabled": null,
"script": "\t# get the last part of the path\n\tmcm_key \u003d str(currentValue.value).split(\u0027/\u0027)[-1]\n\tself.custom.area \u003d mcm_key\n\tsystem.perspective.print(mcm_key)\n\n#\t# get the JSON from the custom property\n#\tjson_data \u003d self.custom.plc_dict\n#\t\n#\t# lookup the Area value\n#\tarea_value \u003d json_data.get(mcm_key, {}).get(\"Area\", \"Unknown\")\n#\t\n#\t# debug prints\n#\tsystem.perspective.print(mcm_key)\n#\tsystem.perspective.print(area_value)\n\t\n\t# write result to another property (e.g., Label.props.text)\n#\tself.getSibling(\"Label\").props.text \u003d \"{mcm_key} - {area_value}\""
}
},
"custom.plc_dict": {
@ -320,23 +297,9 @@
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC"
},
"transforms": [
{
"expression": "jsonGet({value},{this.custom.lookup_path})",
"type": "expression"
}
],
"type": "tag"
}
},
"custom.sub_area": {
"binding": {
"config": {
"expression": "if(isNull({this.custom.lookup_path}), \"\",\r\ntry(jsonGet({this.custom.plc_dict},\"SubArea\"), \"\"))"
},
"type": "expr"
}
},
"position.display": {
"binding": {
"config": {
@ -348,7 +311,7 @@
"props.text": {
"binding": {
"config": {
"path": "this.custom.path_to_display"
"path": "this.custom.area"
},
"type": "property"
}

View File

@ -10,8 +10,8 @@
"attributes": {
"lastModification": {
"actor": "admin",
"timestamp": "2025-09-24T09:56:18Z"
"timestamp": "2025-09-30T14:51:57Z"
},
"lastModificationSignature": "188eb604e46ce416ee7f2b0f729572a6fb409144ca4d16eba17418944000c2bc"
"lastModificationSignature": "f3a46607418562736242da1164966444593661ec0978fde0cbdea8d58d87901a"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -0,0 +1,17 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json",
"thumbnail.png"
],
"attributes": {
"lastModification": {
"actor": "admin",
"timestamp": "2025-09-30T14:50:30Z"
},
"lastModificationSignature": "ac6599d353b184d06cb64dae6ead9a578f783bcf7c9b51f60383327212632ab8"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -10,8 +10,8 @@
"attributes": {
"lastModification": {
"actor": "admin",
"timestamp": "2025-09-30T12:15:29Z"
"timestamp": "2025-09-30T14:17:31Z"
},
"lastModificationSignature": "c5e7e78cfe726ad8ece3c2ff132a1f12ca1332fd94f64ae8880d277227c2e678"
"lastModificationSignature": "371c65c23baac23404c7c147cf5738cca094a6a924578ac3542ce65edceb48cc"
}
}

View File

@ -585,7 +585,7 @@
},
"props": {
"dismissOnSelect": false,
"formattedValue": "Sep 30, 2025 8:15 AM",
"formattedValue": "Sep 30, 2025 10:17 AM",
"formattedValues": {
"date": "Mar 26, 2021",
"datetime": "Mar 26, 2021 12:00 AM",
@ -603,9 +603,9 @@
"$": [
"ts",
192,
1759234527871
1759241850950
],
"$ts": 1759205727000
"$ts": 1759213050000
}
},
"type": "ia.input.date-time-input"
@ -756,7 +756,7 @@
},
"props": {
"dismissOnSelect": false,
"formattedValue": "Sep 30, 2025 4:15 PM",
"formattedValue": "Sep 30, 2025 6:17 PM",
"formattedValues": {
"date": "Mar 29, 2021",
"datetime": "Mar 29, 2021 1:37 PM",
@ -774,9 +774,9 @@
"$": [
"ts",
192,
1759234527871
1759241850968
],
"$ts": 1759234527000
"$ts": 1759241850000
}
},
"type": "ia.input.date-time-input"