diff -r 375626e60b63 -r 9c725829d8f0 svghmi/widget_button.ysl2 --- a/svghmi/widget_button.ysl2 Wed Aug 31 12:16:09 2022 +0200 +++ b/svghmi/widget_button.ysl2 Fri Sep 02 10:46:05 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; | } }