SVGHMI: Add list of HMI tree path in a JS array, so that we can use it for multiple purpose : svghmi
authorEdouard Tisserant
Fri, 26 Mar 2021 14:53:35 +0100
branchsvghmi
changeset 3205 62753288be74
parent 3204 856f4698a0a8
child 3206 4fd7bd10e606
SVGHMI: Add list of HMI tree path in a JS array, so that we can use it for multiple purpose :
- display name of edited variable in keypads (currently wrong in relative pages)
- have some variable that hold basename of current relative page HMI_NODE's path
- propose some list of names in DropDown when selecting a relative page to jump to, without having to instancite many jump widgets.
svghmi/hmi_tree.ysl2
--- a/svghmi/hmi_tree.ysl2	Fri Mar 26 14:46:38 2021 +0100
+++ b/svghmi/hmi_tree.ysl2	Fri Mar 26 14:53:35 2021 +0100
@@ -22,7 +22,14 @@
     | var hmitree_types = [
 
     foreach "$indexed_hmitree/*" 
-    |     /* «@index»  «@hmipath» */ "«substring(local-name(), 5)»"`if "position()!=last()" > ,`
+    |     /* «@index» */ "«substring(local-name(), 5)»"`if "position()!=last()" > ,`
+
+    | ];
+    |
+    | var hmitree_paths = [
+
+    foreach "$indexed_hmitree/*" 
+    |     /* «@index» */ "«@hmipath»"`if "position()!=last()" > ,`
 
     | ];
     |