SVGHMI: little fix in HMI:Button svghmi
authorEdouard Tisserant
Tue, 25 Aug 2020 14:34:49 +0200
branchsvghmi
changeset 3037 da51baea69cb
parent 3036 4930455428df
child 3038 92101729f7b7
SVGHMI: little fix in HMI:Button
svghmi/widget_button.ysl2
--- a/svghmi/widget_button.ysl2	Tue Aug 25 14:32:39 2020 +0200
+++ b/svghmi/widget_button.ysl2	Tue Aug 25 14:34:49 2020 +0200
@@ -33,8 +33,8 @@
                 this.inactive_elt.setAttribute("style", this.inactive_style);
             }
 
-            this.element.setAttribute("onmousedown", "hmi_widgets["+this.element_id+"].on_mouse_down(evt)");
-            this.element.setAttribute("onmouseup", "hmi_widgets["+this.element_id+"].on_mouse_up(evt)");
+            this.element.setAttribute("onmousedown", "hmi_widgets[\""+this.element_id+"\"].on_mouse_down(evt)");
+            this.element.setAttribute("onmouseup", "hmi_widgets[\""+this.element_id+"\"].on_mouse_up(evt)");
          }
     }
     ||