mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Slider: Refactoring _trimValue method to use more sane programming logic
This commit is contained in:
parent
b96ff11e3b
commit
49411982c2
9
ui/jquery.ui.slider.js
vendored
9
ui/jquery.ui.slider.js
vendored
@ -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;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user