diff options
author | jzaefferer <joern.zaefferer@gmail.com> | 2010-03-27 01:52:44 +0100 |
---|---|---|
committer | jzaefferer <joern.zaefferer@gmail.com> | 2010-03-27 01:52:44 +0100 |
commit | 49411982c2ade2f678965b395a56e740a12d049e (patch) | |
tree | 8819d98f83fc7767e519f6702d50bf27bcda60c7 /ui/jquery.ui.slider.js | |
parent | b96ff11e3b30c93f5707d1299096b27a743974f8 (diff) | |
download | jquery-ui-49411982c2ade2f678965b395a56e740a12d049e.tar.gz jquery-ui-49411982c2ade2f678965b395a56e740a12d049e.zip |
Slider: Refactoring _trimValue method to use more sane programming logic
Diffstat (limited to 'ui/jquery.ui.slider.js')
-rw-r--r-- | ui/jquery.ui.slider.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js index bed4185e7..185fe809c 100644 --- a/ui/jquery.ui.slider.js +++ b/ui/jquery.ui.slider.js @@ -559,9 +559,12 @@ $.widget("ui.slider", $.ui.mouse, { }, _trimValue: function(val) { - if (val < this._valueMin()) val = this._valueMin(); - if (val > this._valueMax()) val = this._valueMax(); - + if (val < this._valueMin()) { + return this._valueMin(); + } + if (val > this._valueMax()) { + return this._valueMax(); + } return val; }, |