SVGHMI: set initial displayed value of input widget to empty string.
--- 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 = "";
+ }
| },
}