Slider: Refactoring _trimValue method to use more sane programming logic

This commit is contained in:
jzaefferer 2010-03-27 01:52:44 +01:00
parent b96ff11e3b
commit 49411982c2

View File

@ -559,9 +559,12 @@ $.widget("ui.slider", $.ui.mouse, {
}, },
_trimValue: function(val) { _trimValue: function(val) {
if (val < this._valueMin()) val = this._valueMin(); if (val < this._valueMin()) {
if (val > this._valueMax()) val = this._valueMax(); return this._valueMin();
}
if (val > this._valueMax()) {
return this._valueMax();
}
return val; return val;
}, },