SVGHMI: set initial displayed value of input widget to empty string.
authorEdouard Tisserant
Fri, 24 Jun 2022 09:24:19 +0200
changeset 3523 13282f91e6ff
parent 3522 f3a14422d56e
child 3524 27d298c6f961
SVGHMI: set initial displayed value of input widget to empty string.
svghmi/widget_input.ysl2
--- a/svghmi/widget_input.ysl2	Fri Jun 24 09:21:24 2022 +0200
+++ b/svghmi/widget_input.ysl2	Fri Jun 24 09:24:19 2022 +0200
@@ -51,6 +51,8 @@
      undershot(new_val, min) {
          this.alert("min");
      }
+
+     display = "";
 ||
 
 widget_defs("Input") {
@@ -65,7 +67,6 @@
 
     if "$have_value"
     |     frequency: 5,
-
     |     dispatch: function(value) {
 
 
@@ -100,11 +101,15 @@
         if "$have_value" {
     |         this.value_elt.style.pointerEvents = "none";
         }
+    |         this.animate();
     }
 
     foreach "$hmi_element/*[regexp:test(@inkscape:label,'^[=+\-].+')]" {
     |         id("«@id»").onclick = () => this.on_op_click("«func:escape_quotes(@inkscape:label)»");
     }
 
+    if "$have_value" {
+    |         this.value_elt.textContent = "";
+    }
     |     },
 }