svghmi/widget_input.ysl2
branchsvghmi
changeset 3153 671283404554
parent 3118 e704b0487515
child 3155 99ce78ddd353
--- a/svghmi/widget_input.ysl2	Fri Feb 19 10:03:00 2021 +0100
+++ b/svghmi/widget_input.ysl2	Fri Feb 19 10:04:17 2021 +0100
@@ -45,7 +45,14 @@
     |         this.last_val = value;
 
     if "$have_value" {
+        choose{
+            when "count(arg) = 1" {
+    |         this.last_display = vsprintf("«arg[1]/@value»", value);
+            }
+            otherwise {
     |         this.last_display = value;
+            }
+        }
     |         this.request_animate();
     }
     |     },
@@ -60,6 +67,9 @@
 
     if "$have_edit" {
     |         this.edit_elt.onclick = () => edit_value("«path/@value»", "«path/@type»", this, this.last_val);
+        if "$have_value" {
+    |         this.value_elt.style.pointerEvents = "none";
+        }
     }
 
     foreach "$hmi_element/*[regexp:test(@inkscape:label,'^[=+\-].+')]" {