svghmi/widget_button.ysl2
branchsvghmi
changeset 3000 a9a45977bac0
parent 2976 99c4521bb844
child 3004 705e34c6fe93
equal deleted inserted replaced
2999:f87d2ac70d04 3000:a9a45977bac0
     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     |     change_hmi_value(this.indexes[0], "=1");
    12     |     apply_hmi_value(this.get_idx(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     |     change_hmi_value(this.indexes[0], "=0");
    19     |     apply_hmi_value(this.get_idx(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;