svghmi/widget_button.ysl2
branchsvghmi
changeset 3004 705e34c6fe93
parent 3000 a9a45977bac0
child 3009 7c6960f09881
equal deleted inserted replaced
3003:9771a724af09 3004:705e34c6fe93
     7     | on_mouse_down: function(evt) {
     7     | on_mouse_down: function(evt) {
     8     |     if (this.active_style && this.inactive_style) {
     8     |     if (this.active_style && this.inactive_style) {
     9     |         this.active_elt.setAttribute("style", this.active_style);
     9     |         this.active_elt.setAttribute("style", this.active_style);
    10     |         this.inactive_elt.setAttribute("style", "display:none");
    10     |         this.inactive_elt.setAttribute("style", "display:none");
    11     |     }
    11     |     }
    12     |     apply_hmi_value(this.get_idx(0), 1);
    12     |     this.apply_hmi_value(0, 1);
    13     | },
    13     | },
    14     | on_mouse_up: function(evt) {
    14     | on_mouse_up: function(evt) {
    15     |     if (this.active_style && this.inactive_style) {
    15     |     if (this.active_style && this.inactive_style) {
    16     |         this.active_elt.setAttribute("style", "display:none");
    16     |         this.active_elt.setAttribute("style", "display:none");
    17     |         this.inactive_elt.setAttribute("style", this.inactive_style);
    17     |         this.inactive_elt.setAttribute("style", this.inactive_style);
    18     |     }
    18     |     }
    19     |     apply_hmi_value(this.get_idx(0), 0);
    19     |     this.apply_hmi_value(0, 0);
    20     | },
    20     | },
    21     | active_style: undefined,
    21     | active_style: undefined,
    22     | inactive_style: undefined,
    22     | inactive_style: undefined,
    23     | init: function() {
    23     | init: function() {
    24     |   this.active_style = this.active_elt ? this.active_elt.style.cssText : undefined;
    24     |   this.active_style = this.active_elt ? this.active_elt.style.cssText : undefined;