svghmi/widget_input.ysl2
branchsvghmi
changeset 3024 0a9f6f29b7dd
parent 3010 893cc309f5e2
child 3034 793ce2117258
equal deleted inserted replaced
3023:407a0205405a 3024:0a9f6f29b7dd
     1 // widget_input.ysl2
     1 // widget_input.ysl2
     2 
     2 
     3 template "widget[@type='Input']", mode="widget_defs" {
     3 template "widget[@type='Input']", mode="widget_defs" {
     4     param "hmi_element";
     4     param "hmi_element";
       
     5     optional_labels("key_pos");
     5     const "value_elt" {
     6     const "value_elt" {
     6         optional_labels("value");
     7         optional_labels("value");
     7     }
     8     }
     8     const "have_value","string-length($value_elt)>0";
     9     const "have_value","string-length($value_elt)>0";
     9     value "$value_elt";
    10     value "$value_elt";
    31     // |         this.value_elt.textContent = String(new_val);
    32     // |         this.value_elt.textContent = String(new_val);
    32     //           /* TODO gray out value until refreshed */
    33     //           /* TODO gray out value until refreshed */
    33     //     }
    34     //     }
    34     |     },
    35     |     },
    35     |     on_edit_click: function(opstr) {
    36     |     on_edit_click: function(opstr) {
    36     |         edit_value("«path/@value»", "«path/@type»", this, this.last_val);
    37     |         var size = (typeof this.key_pos_elt !== 'undefined') ?  this.key_pos_elt.getBBox() : undefined
       
    38     |         edit_value("«path/@value»", "«path/@type»", this, this.last_val,size);
    37     |     },
    39     |     },
    38 
    40 
    39     |     edit_callback: function(new_val) {
    41     |     edit_callback: function(new_val) {
    40     |         this.apply_hmi_value(0, new_val);
    42     |         this.apply_hmi_value(0, new_val);
    41     //     if "$have_value"{
    43     //     if "$have_value"{