public/javascripts/yui/slider/slider.js
function(silent) {
        var min     = this.minSlider.getValue(),
            max     = this.maxSlider.getValue(),
            changed = false,
            mint,maxt,dim,minConstraint,maxConstraint,thumbInnerWidth;

        if (min != this.minVal || max != this.maxVal) {
            changed = true;

            mint = this.minSlider.thumb;
            maxt = this.maxSlider.thumb;
            dim  = this.isHoriz ? 'x' : 'y';

            thumbInnerWidth = this.minSlider.thumbCenterPoint[dim] +
                              this.maxSlider.thumbCenterPoint[dim];

            // Establish barriers within the respective other thumb's edge, less
            // the minRange.  Limit to the Slider's range in the case of
            // negative minRanges.
            minConstraint = Math.max(max-thumbInnerWidth-this.minRange,0);
            maxConstraint = Math.min(-min-thumbInnerWidth-this.minRange,0);

            if (this.isHoriz) {
                minConstraint = Math.min(minConstraint,maxt.rightConstraint);

                mint.setXConstraint(mint.leftConstraint,minConstraint, mint.tickSize);

                maxt.setXConstraint(maxConstraint,maxt.rightConstraint, maxt.tickSize);
            } else {
                minConstraint = Math.min(minConstraint,maxt.bottomConstraint);
                mint.setYConstraint(mint.leftConstraint,minConstraint, mint.tickSize);

                maxt.setYConstraint(maxConstraint,maxt.bottomConstraint, maxt.tickSize);
            }
        }

        this.minVal = min;
        this.maxVal = max;

        if (changed && !silent) {
            this.fireEvent("change", this);
        }
    }
function(silent) {
        var min     = this.minSlider.getValue(),
            max     = this.maxSlider.getValue(),
            changed = false,
            mint,maxt,dim,minConstraint,maxConstraint,thumbInnerWidth;

        if (min != this.minVal || max != this.maxVal) {
            changed = true;

            mint = this.minSlider.thumb;
            maxt = this.maxSlider.thumb;
            dim  = this.isHoriz ? 'x' : 'y';

            thumbInnerWidth = this.minSlider.thumbCenterPoint[dim] +
                              this.maxSlider.thumbCenterPoint[dim];

            // Establish barriers within the respective other thumb's edge, less
            // the minRange.  Limit to the Slider's range in the case of
            // negative minRanges.
            minConstraint = Math.max(max-thumbInnerWidth-this.minRange,0);
            maxConstraint = Math.min(-min-thumbInnerWidth-this.minRange,0);

            if (this.isHoriz) {
                minConstraint = Math.min(minConstraint,maxt.rightConstraint);

                mint.setXConstraint(mint.leftConstraint,minConstraint, mint.tickSize);

                maxt.setXConstraint(maxConstraint,maxt.rightConstraint, maxt.tickSize);
            } else {
                minConstraint = Math.min(minConstraint,maxt.bottomConstraint);
                mint.setYConstraint(mint.leftConstraint,minConstraint, mint.tickSize);

                maxt.setYConstraint(maxConstraint,maxt.bottomConstraint, maxt.tickSize);
            }
        }

        this.minVal = min;
        this.maxVal = max;

        if (changed && !silent) {
            this.fireEvent("change", this);
        }
    }
function ( silent ) { var min = this . minSlider . getValue ( ) , max = this . maxSlider . getValue ( ) , changed = false , mint , maxt , dim , minConstraint , maxConstraint , thumbInnerWidth ; if ( min != this . minVal || max != this . maxVal ) { changed = true ; mint = this . minSlider . thumb ; maxt = this . maxSlider . thumb ; dim = this . isHoriz ? 'x' : 'y' ; thumbInnerWidth = this . minSlider . thumbCenterPoint [ dim ] + this . maxSlider . thumbCenterPoint [ dim ] ; // Establish barriers within the respective other thumb's edge, less // the minRange.  Limit to the Slider's range in the case of // negative minRanges. minConstraint = Math . max ( max - thumbInnerWidth - this . minRange , 0 ) ; maxConstraint = Math . min ( - min - thumbInnerWidth - this . minRange , 0 ) ; if ( this . isHoriz ) { minConstraint = Math . min ( minConstraint , maxt . rightConstraint ) ; mint . setXConstraint ( mint . leftConstraint , minConstraint , mint . tickSize ) ; maxt . setXConstraint ( maxConstraint , maxt . rightConstraint , maxt . tickSize ) ; } else { minConstraint = Math . min ( minConstraint , maxt . bottomConstraint ) ; mint . setYConstraint ( mint . leftConstraint , minConstraint , mint . tickSize ) ; maxt . setYConstraint ( maxConstraint , maxt . bottomConstraint , maxt . tickSize ) ; } } this . minVal = min ; this . maxVal = max ; if ( changed && ! silent ) { this . fireEvent ( "change" , this ) ; } }
Executed when one of the sliders is moved
@method updateValue
@param silent {boolean} (optional) Set to true to skip firing change
events.  Default false
@private
Executed when one of the sliders is moved