svghmi/widget_tooglebutton.ysl2
changeset 3478 c04c6db09eff
parent 3241 fe945f1f48b7
child 3519 43b2bff95289
equal deleted inserted replaced
3477:9ec5ecf9f589 3478:c04c6db09eff
    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         }