Turns off the light by gradually fading it out.
        The optional `duration` parameter allows for control
        of the fade out duration (in seconds)
423117
def fade_out(self, duration=3, group=0):
        """"""
        self.on(group)
        super(WhiteLight, self).fade_out(duration, group=group)
        self.off(group)
856548
function _off(sel, evt, fn) {
    $each(_bound(sel, evt, fn), (e) => {
        if (`on${e.evt}` in _doc) {
            e.el.removeEventListener(e.evt, e.cb);
        } else if (custom[e.evt]) {
            custom[e.evt][1](e.el, e.cb);
        }

        bound.splice(bound.indexOf(e), 1);
    });
}
980457
function onVisibilityChangeFactory(hidden) {
  return function onVisibilityChange(evt) {
    if (document[hidden]) {
      debug('disable while hidden');
      stop();
    } else {
      debug('enable while visible');
      if (process.env.NODE_ENV === 'development') {
        const current = now();

        for (let i = 0, n = timeoutQueue.length; i < n; i++) {
          const item = timeoutQueue[i];

          if (item.time <= current) {
            debug('timeout should trigger for "%s"', item.id);
          } else {
            const date = new Date();

            date.setMilliseconds(date.getMilliseconds() + item.time - current);
            debug('timeout for "%s" expected at %s', item.id, date.toLocaleTimeString());
          }
        }
      }
      run();
    }
  };
}
566406
def transition(self, duration, color=None, brightness=None):
        
        # Transition to white immediately.
        if color == RGB_WHITE:
            self.white()
            color = None
        # Transition away from white immediately.
        elif self.color == RGB_WHITE and color is not None:
            self.color = color
            color = None
        # Transition immediately if duration is zero.
        if duration == 0:
            if color:
                self.color = color
            if brightness is not None:
                self.brightness = brightness
            return
        # Perform transition
        if color != self.color or brightness != self.brightness:
            if color is None and brightness == self.brightness:
                return
            if color is None:
                self._transition(duration, brightness=brightness)
            else:
                self._transition(duration, hue_of_color(color), brightness)
750515
function() {
			var t = this;
			
			setTimeout(function() {
				t.$obj.removeClass(t.factory.classes.play);
			}, this.factory.timer.interval);
		}
1369858
function() {
            for (var i = 0; i < this.helpers.length; i++) {
                (function($draggeeHelper) {
                    $draggeeHelper.velocity('fadeOut', {
                        duration: Garnish.FX_DURATION,
                        complete: function() {
                            $draggeeHelper.remove();
                        }
                    });
                })(this.helpers[i]);
            }
        }
885951
function() {
      if (this.parenEvent) this.parent.clearTimeout(this.parenEvent);
      var self = this;
      this.parenEvent = this.parent.setTimeout(function(){self.highlightParens();}, 300);
    }
884374
function(ev) {
    if (ev) {
      ev.preventDefault();
      ev.stopPropagation();
    }
    if (this.model.get("visibility")) {
       this.model.set("visibility", false);
       this.trigger('close');
    }
  }
689860
public static void setVisibleDuration(Duration duration) {
        BEHAVIOR.setVisibleDuration(duration == null ? Duration.millis(1500) : duration);
    }
1286071
def turn_off(self, channel, callback=None):
        
        if callback is None:
            def callb():
                """No-op"""
                pass
            callback = callb
        message = velbus.SwitchRelayOffMessage(self._address)
        message.relay_channels = [channel]
        self._controller.send(message, callback)
747761
@SuppressWarnings("squid:S00100")
    public static Expression fade_out(Generator generator, FunctionCall input) {
        return opacify(generator, input);
    }
335047
function disableControlsTemporarily() {
    viewer.controls().disableMethod('touchView');
    viewer.controls().disableMethod('pinch');
    setTimeout(function() {
      viewer.controls().enableMethod('touchView');
      viewer.controls().enableMethod('pinch');
    }, 200);
  }
637690
function () {
        var that = this,
            events = 'mouseover focus keydown',
            timer,
            callback = function () {
                that.initializer.resolve();
                that.enable();
            };

        that.initializer.always(function(){
            that.el.off(events, callback);
            clearInterval(timer);
        });

        that.disabled = true;
        that.el.on(events, callback);
        timer = setInterval(function(){
            if (that.el.is(':visible')) {
                callback();
            }
        }, that.options.initializeInterval);
    }
214457
function toggle(ev) {
		if (ev)
			ev.preventDefault()
		
		autoTime = 0
		autoPlay = true
		curTimeline = curTimeline === anim1 ? anim2 : anim1
		duration = curTimeline.duration()

		//clear style
		widget.element.style.cssText = ''

		editor.show(curTimeline === anim1 ? 0 : 1)
		editor.hide(curTimeline === anim1 ? 1 : 0)
	}
785473
def fade_in(self, duration=3, group=0):
        """"""
        self.on(group)
        super(WhiteLight, self).fade_in(duration, group=group)
860848
function(view, delay) {
            var self = this;

            var raiseAfterShowHours = false;
            var raiseAfterShowMinutes = false;
            if (view === 'hours') {
                raiseCallback(this.options.beforeShowHours);
                raiseAfterShowHours = true;
            }
            if (view === 'minutes') {
                raiseCallback(this.options.beforeShowMinutes);
                raiseAfterShowMinutes = true;
            }
            var isHours = view === 'hours',
                nextView = isHours ? this.hoursView : this.minutesView,
                hideView = isHours ? this.minutesView : this.hoursView;

            this.currentView = view;

            this._checkTimeLimits();

            this.hoursLabel.toggleClass('jqclockpicker-active', isHours);
            this.minutesLabel.toggleClass('jqclockpicker-active', !isHours);

            // Let's make transitions
            hideView.addClass('jqclockpicker-dial-out');
            nextView.css('visibility', 'visible').removeClass('jqclockpicker-dial-out');

            // Reset clock hand
            this.resetClock(delay);

            // After transitions ended
            clearTimeout(this.toggleViewTimer);
            this.toggleViewTimer = setTimeout(function() {
                hideView.css('visibility', 'hidden');
            }, duration);

            if (raiseAfterShowHours) {
                raiseCallback(this.options.afterShowHours);
            }

            if (raiseAfterShowMinutes) {
                raiseCallback(this.options.afterShowMinutes);
            }
        }
661756
function FadeTo (opts) {
    FadeTo.superclass.constructor.call(this, opts)
    this.toOpacity = opts.toOpacity
}