svghmi/widget_tooglebutton.ysl2
changeset 3495 f422d3d71f89
parent 3241 fe945f1f48b7
child 3519 43b2bff95289
equal deleted inserted replaced
3494:435259844a64 3495:f422d3d71f89
    36             //redraw toggle button
    36             //redraw toggle button
    37             this.request_animate();
    37             this.request_animate();
    38         }
    38         }
    39 
    39 
    40         activate(val) {
    40         activate(val) {
    41             let [active, inactive] = val ? ["none",""] : ["", "none"];
    41             let [active, inactive] = val ? ["","none"] : ["none", ""];
    42             if (this.active_elt)
    42             if (this.active_elt)
    43                 this.active_elt.style.display = active;
    43                 this.active_elt.style.display = active;
    44             if (this.inactive_elt)
    44             if (this.inactive_elt)
    45                 this.inactive_elt.style.display = inactive;
    45                 this.inactive_elt.style.display = inactive;
    46         }
    46         }