Skip to content
Permalink
Browse files

Slider: Refactoring _trimValue method to use more sane programming logic

  • Loading branch information
jzaefferer committed Mar 27, 2010
1 parent b96ff11 commit 49411982c2ade2f678965b395a56e740a12d049e
Showing with 6 additions and 3 deletions.
  1. +6 −3 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;
},

0 comments on commit 4941198

Please sign in to comment.
You can’t perform that action at this time.