svghmi/widget_input.ysl2
branchsvghmi
changeset 3010 893cc309f5e2
parent 3004 705e34c6fe93
child 3034 793ce2117258
--- a/svghmi/widget_input.ysl2	Wed Aug 05 15:04:53 2020 +0200
+++ b/svghmi/widget_input.ysl2	Wed Aug 05 15:13:59 2020 +0200
@@ -2,6 +2,7 @@
 
 template "widget[@type='Input']", mode="widget_defs" {
     param "hmi_element";
+    optional_labels("key_pos");
     const "value_elt" {
         optional_labels("value");
     }
@@ -33,7 +34,8 @@
     //     }
     |     },
     |     on_edit_click: function(opstr) {
-    |         edit_value("«path/@value»", "«path/@type»", this, this.last_val);
+    |         var size = (typeof this.key_pos_elt !== 'undefined') ?  this.key_pos_elt.getBBox() : undefined
+    |         edit_value("«path/@value»", "«path/@type»", this, this.last_val,size);
     |     },
 
     |     edit_callback: function(new_val) {