diff -r 02229133df43 -r 51a3d6f39944 svghmi/widget_button.ysl2 --- a/svghmi/widget_button.ysl2 Tue Sep 13 16:51:54 2022 +0200 +++ b/svghmi/widget_button.ysl2 Tue Sep 13 16:53:15 2022 +0200 @@ -151,7 +151,7 @@ | } } template "show", mode="actions" { - | this.display = "«@eltname»"; + | this.activity_state = «@eltname = 'active'»; | this.request_animate(); } template "hmi-value", mode="actions" { @@ -164,7 +164,6 @@ function "generated_button_class" { param "fsm"; - | display = "inactive"; | state = "init"; | dispatch(value) { @@ -182,14 +181,10 @@ apply "$fsm", mode="actions"; - | animate(){ - | this.set_activation_state(this.display == "active"); - | } - | init() { | this.bound_onmouseup = this.onmouseup.bind(this); | this.element.addEventListener("pointerdown", this.onmousedown.bind(this)); - | this.set_activation_state(undefined); + | this.activity_state = undefined; | } }