public/javascripts/yui/slider/slider.js
function (min, max, skipAnim, force, silent) {
        var mins = this.minSlider,
            maxs = this.maxSlider,
            mint = mins.thumb,
            maxt = maxs.thumb,
            self = this,
            done = { min : false, max : false };

        // Clear constraints to prevent animated thumbs from prematurely
        // stopping when hitting a constraint that's moving with the other
        // thumb.
        if (mint._isHoriz) {
            mint.setXConstraint(mint.leftConstraint,maxt.rightConstraint,mint.tickSize);
            maxt.setXConstraint(mint.leftConstraint,maxt.rightConstraint,maxt.tickSize);
        } else {
            mint.setYConstraint(mint.topConstraint,maxt.bottomConstraint,mint.tickSize);
            maxt.setYConstraint(mint.topConstraint,maxt.bottomConstraint,maxt.tickSize);
        }

        // Set up one-time slideEnd callbacks to call updateValue when both
        // thumbs have been set
        this._oneTimeCallback(mins,'slideEnd',function () {
            done.min = true;
            if (done.max) {
                self.updateValue(silent);
                // Clean the slider's slideEnd events on a timeout since this
                // will be executed from inside the event's fire
                setTimeout(function () {
                    self._cleanEvent(mins,'slideEnd');
                    self._cleanEvent(maxs,'slideEnd');
                },0);
            }
        });

        this._oneTimeCallback(maxs,'slideEnd',function () {
            done.max = true;
            if (done.min) {
                self.updateValue(silent);
                // Clean both sliders' slideEnd events on a timeout since this
                // will be executed from inside one of the event's fire
                setTimeout(function () {
                    self._cleanEvent(mins,'slideEnd');
                    self._cleanEvent(maxs,'slideEnd');
                },0);
            }
        });

        // Must emit Slider slideEnd event to propagate to updateValue
        mins.setValue(min,skipAnim,force,false);
        maxs.setValue(max,skipAnim,force,false);
    }
function (min, max, skipAnim, force, silent) {
        var mins = this.minSlider,
            maxs = this.maxSlider,
            mint = mins.thumb,
            maxt = maxs.thumb,
            self = this,
            done = { min : false, max : false };

        // Clear constraints to prevent animated thumbs from prematurely
        // stopping when hitting a constraint that's moving with the other
        // thumb.
        if (mint._isHoriz) {
            mint.setXConstraint(mint.leftConstraint,maxt.rightConstraint,mint.tickSize);
            maxt.setXConstraint(mint.leftConstraint,maxt.rightConstraint,maxt.tickSize);
        } else {
            mint.setYConstraint(mint.topConstraint,maxt.bottomConstraint,mint.tickSize);
            maxt.setYConstraint(mint.topConstraint,maxt.bottomConstraint,maxt.tickSize);
        }

        // Set up one-time slideEnd callbacks to call updateValue when both
        // thumbs have been set
        this._oneTimeCallback(mins,'slideEnd',function () {
            done.min = true;
            if (done.max) {
                self.updateValue(silent);
                // Clean the slider's slideEnd events on a timeout since this
                // will be executed from inside the event's fire
                setTimeout(function () {
                    self._cleanEvent(mins,'slideEnd');
                    self._cleanEvent(maxs,'slideEnd');
                },0);
            }
        });

        this._oneTimeCallback(maxs,'slideEnd',function () {
            done.max = true;
            if (done.min) {
                self.updateValue(silent);
                // Clean both sliders' slideEnd events on a timeout since this
                // will be executed from inside one of the event's fire
                setTimeout(function () {
                    self._cleanEvent(mins,'slideEnd');
                    self._cleanEvent(maxs,'slideEnd');
                },0);
            }
        });

        // Must emit Slider slideEnd event to propagate to updateValue
        mins.setValue(min,skipAnim,force,false);
        maxs.setValue(max,skipAnim,force,false);
    }
function ( min , max , skipAnim , force , silent ) { var mins = this . minSlider , maxs = this . maxSlider , mint = mins . thumb , maxt = maxs . thumb , self = this , done = { min : false , max : false } ; // Clear constraints to prevent animated thumbs from prematurely // stopping when hitting a constraint that's moving with the other // thumb. if ( mint . _isHoriz ) { mint . setXConstraint ( mint . leftConstraint , maxt . rightConstraint , mint . tickSize ) ; maxt . setXConstraint ( mint . leftConstraint , maxt . rightConstraint , maxt . tickSize ) ; } else { mint . setYConstraint ( mint . topConstraint , maxt . bottomConstraint , mint . tickSize ) ; maxt . setYConstraint ( mint . topConstraint , maxt . bottomConstraint , maxt . tickSize ) ; } // Set up one-time slideEnd callbacks to call updateValue when both // thumbs have been set this . _oneTimeCallback ( mins , 'slideEnd' , function ( ) { done . min = true ; if ( done . max ) { self . updateValue ( silent ) ; // Clean the slider's slideEnd events on a timeout since this // will be executed from inside the event's fire setTimeout ( function ( ) { self . _cleanEvent ( mins , 'slideEnd' ) ; self . _cleanEvent ( maxs , 'slideEnd' ) ; } , 0 ) ; } } ) ; this . _oneTimeCallback ( maxs , 'slideEnd' , function ( ) { done . max = true ; if ( done . min ) { self . updateValue ( silent ) ; // Clean both sliders' slideEnd events on a timeout since this // will be executed from inside one of the event's fire setTimeout ( function ( ) { self . _cleanEvent ( mins , 'slideEnd' ) ; self . _cleanEvent ( maxs , 'slideEnd' ) ; } , 0 ) ; } } ) ; // Must emit Slider slideEnd event to propagate to updateValue mins . setValue ( min , skipAnim , force , false ) ; maxs . setValue ( max , skipAnim , force , false ) ; }
Sets the min and max thumbs to new values.
@method setValues
@param min {int} Pixel offset to assign to the min thumb
@param max {int} Pixel offset to assign to the max thumb
@param skipAnim {boolean} (optional) Set to true to skip thumb animation.
Default false
@param force {boolean} (optional) ignore the locked setting and set
value anyway. Default false
@param silent {boolean} (optional) Set to true to skip firing change
events.  Default false
Sets the min and max thumbs to new values .