diff -r f87d2ac70d04 -r a9a45977bac0 svghmi/widget_button.ysl2 --- a/svghmi/widget_button.ysl2 Mon Aug 03 16:30:16 2020 +0200 +++ b/svghmi/widget_button.ysl2 Mon Aug 03 16:32:23 2020 +0200 @@ -9,14 +9,14 @@ | this.active_elt.setAttribute("style", this.active_style); | this.inactive_elt.setAttribute("style", "display:none"); | } - | change_hmi_value(this.indexes[0], "=1"); + | apply_hmi_value(this.get_idx(0), 1); | }, | on_mouse_up: function(evt) { | if (this.active_style && this.inactive_style) { | this.active_elt.setAttribute("style", "display:none"); | this.inactive_elt.setAttribute("style", this.inactive_style); | } - | change_hmi_value(this.indexes[0], "=0"); + | apply_hmi_value(this.get_idx(0), 0); | }, | active_style: undefined, | inactive_style: undefined, @@ -30,4 +30,4 @@ | this.element.setAttribute("onmousedown", "hmi_widgets['«$hmi_element/@id»'].on_mouse_down(evt)"); | this.element.setAttribute("onmouseup", "hmi_widgets['«$hmi_element/@id»'].on_mouse_up(evt)"); | }, -} \ No newline at end of file +}