svghmi/widget_input.ysl2
branchsvghmi
changeset 3004 705e34c6fe93
parent 3001 003fd80ff0b8
child 3010 893cc309f5e2
equal deleted inserted replaced
3003:9771a724af09 3004:705e34c6fe93
    24     foreach "$hmi_element/*[regexp:test(@inkscape:label,'^[=+\-].+')]" {
    24     foreach "$hmi_element/*[regexp:test(@inkscape:label,'^[=+\-].+')]" {
    25     |         id("«@id»").setAttribute("onclick", "hmi_widgets['«$hmi_element/@id»'].on_op_click('«func:escape_quotes(@inkscape:label)»')");
    25     |         id("«@id»").setAttribute("onclick", "hmi_widgets['«$hmi_element/@id»'].on_op_click('«func:escape_quotes(@inkscape:label)»')");
    26     }
    26     }
    27     |     },
    27     |     },
    28     |     on_op_click: function(opstr) {
    28     |     on_op_click: function(opstr) {
    29     |         let new_val = change_hmi_value(this.get_idx(0), opstr);
    29     |         let new_val = this.change_hmi_value(0, opstr);
    30     //     if "$have_value"{
    30     //     if "$have_value"{
    31     // |         this.value_elt.textContent = String(new_val);
    31     // |         this.value_elt.textContent = String(new_val);
    32     //           /* TODO gray out value until refreshed */
    32     //           /* TODO gray out value until refreshed */
    33     //     }
    33     //     }
    34     |     },
    34     |     },
    35     |     on_edit_click: function(opstr) {
    35     |     on_edit_click: function(opstr) {
    36     |         edit_value("«path/@value»", "«path/@type»", this, this.last_val);
    36     |         edit_value("«path/@value»", "«path/@type»", this, this.last_val);
    37     |     },
    37     |     },
    38 
    38 
    39     |     edit_callback: function(new_val) {
    39     |     edit_callback: function(new_val) {
    40     |         apply_hmi_value(this.get_idx(0), new_val);
    40     |         this.apply_hmi_value(0, new_val);
    41     //     if "$have_value"{
    41     //     if "$have_value"{
    42     // |         this.value_elt.textContent = String(new_val);
    42     // |         this.value_elt.textContent = String(new_val);
    43     //           /* TODO gray out value until refreshed */
    43     //           /* TODO gray out value until refreshed */
    44     //     }
    44     //     }
    45     |     },
    45     |     },