svghmi/widget_dropdown.ysl2
branchsvghmi
changeset 3001 003fd80ff0b8
parent 2936 53fb11263ff1
child 3004 705e34c6fe93
equal deleted inserted replaced
3000:a9a45977bac0 3001:003fd80ff0b8
    36         this.opened = false;
    36         this.opened = false;
    37     },
    37     },
    38     // Called when a menu entry is clicked
    38     // Called when a menu entry is clicked
    39     on_selection_click: function(selection) {
    39     on_selection_click: function(selection) {
    40         this.close();
    40         this.close();
    41         let orig = this.indexes[0];
    41         apply_hmi_value(this.get_idx(0), selection);
    42         let idx = this.offset ? orig - this.offset : orig;
       
    43         apply_hmi_value(idx, selection);
       
    44     },
    42     },
    45     on_button_click: function() {
    43     on_button_click: function() {
    46         this.open();
    44         this.open();
    47     },
    45     },
    48     on_backward_click: function(){
    46     on_backward_click: function(){