SVGHMI: re-indenting svghmi
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Mon, 02 Mar 2020 16:25:35 +0100
branchsvghmi
changeset 2849 bb89a2fbb4e0
parent 2848 c525b1083653
child 2850 e38654ec6281
SVGHMI: re-indenting
svghmi/gen_index_xhtml.ysl2
--- a/svghmi/gen_index_xhtml.ysl2	Mon Mar 02 14:43:21 2020 +0100
+++ b/svghmi/gen_index_xhtml.ysl2	Mon Mar 02 16:25:35 2020 +0100
@@ -484,13 +484,13 @@
         | var hmi_widgets = {
         foreach "$hmi_elements" {
             const "widget", "func:parselabel(@inkscape:label)/widget";
-            | "«@id»": {
-            |     type: "«$widget/@type»",
-            |     args: [
+        |     "«@id»": {
+        |         type: "«$widget/@type»",
+        |         args: [
             foreach "$widget/arg"
-            |         "«@value»"`if "position()!=last()" > ,`
-            |     ],
-            |     indexes: [
+        |             "«@value»"`if "position()!=last()" > ,`
+        |         ],
+        |         indexes: [
             foreach "$widget/path" {
                 const "hmipath","@value";
                 const "hmitree_match","$indexed_hmitree/*[@hmipath = $hmipath]";
@@ -499,14 +499,14 @@
                         warning > No match for path "«$hmipath»" in HMI tree
                     }
                     otherwise {
-            |         «$hmitree_match/@index»`if "position()!=last()" > ,`
+        |             «$hmitree_match/@index»`if "position()!=last()" > ,`
                     }
                 }
             }
-            |     ],
-            |     element: id("«@id»"),
+        |         ],
+        |         element: id("«@id»"),
             apply "$widget", mode="widget_defs" with "hmi_element",".";
-            | }`if "position()!=last()" > ,`
+        |     }`if "position()!=last()" > ,`
         }
         | }
         |
@@ -515,7 +515,7 @@
         | var hmitree_types = [
 
         foreach "$indexed_hmitree/*" {
-            | /* «@index»  «@hmipath» */ "«substring(local-name(), 5)»"`if "position()!=last()" > ,`
+        |     /* «@index»  «@hmipath» */ "«substring(local-name(), 5)»"`if "position()!=last()" > ,`
         }
 
         | ]