SVGHMI: cosmetic changes svghmi
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Tue, 29 Dec 2020 15:38:31 +0100
branchsvghmi
changeset 3101 4cbf024a6640
parent 3100 c51f9cf365c6
child 3102 abb487b56911
SVGHMI: cosmetic changes
svghmi/widget_input.ysl2
svghmi/widgets_common.ysl2
--- a/svghmi/widget_input.ysl2	Tue Dec 29 15:37:41 2020 +0100
+++ b/svghmi/widget_input.ysl2	Tue Dec 29 15:38:31 2020 +0100
@@ -4,7 +4,7 @@
 ||
     class InputWidget extends Widget{
          on_op_click(opstr) {
-             let new_val = this.change_hmi_value(0, opstr);
+             this.change_hmi_value(0, opstr);
          }
          edit_callback(new_val) {
              this.apply_hmi_value(0, new_val);
--- a/svghmi/widgets_common.ysl2	Tue Dec 29 15:37:41 2020 +0100
+++ b/svghmi/widgets_common.ysl2	Tue Dec 29 15:38:31 2020 +0100
@@ -31,18 +31,21 @@
                 choose {
                     when "not(@type)" {
                         warning > Widget «$widget/@type» id="«$eltid»" : No match for path "«@value»" in HMI tree
-                        > undefined`if "position()!=last()" > ,`
+                        > undefined
                     }
                     when "@type = 'PAGE_LOCAL'" 
-                        > "«@value»"`if "position()!=last()" > ,`
+                        > "«@value»"
                     when "@type = 'HMI_LOCAL'" 
-                        > hmi_local_index("«@value»")`if "position()!=last()" > ,`
+                        > hmi_local_index("«@value»")
+                    otherwise 
+                        error > Internal error while processing widget's non indexed HMI tree path : unknown type
                 }
             }
             otherwise {
-                > «@index»`if "position()!=last()" > ,`
-            }
-        }
+                > «@index»
+            }
+        }
+        if "position()!=last()" > ,
     }
 
     const "minmaxes" foreach "$widget/path" {