# HG changeset patch # User Edouard Tisserant # Date 1656055459 -7200 # Node ID 13282f91e6ff4b003f4eac8daca254a74cd5a91d # Parent f3a14422d56ecda55c4d52776c3dd0abb1eba106 SVGHMI: set initial displayed value of input widget to empty string. diff -r f3a14422d56e -r 13282f91e6ff 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 = ""; + } | }, }