diff options
author | Paul Bakaus <paul.bakaus@googlemail.com> | 2009-02-17 11:13:30 +0000 |
---|---|---|
committer | Paul Bakaus <paul.bakaus@googlemail.com> | 2009-02-17 11:13:30 +0000 |
commit | 77043b9bf2baf00034463cf9dc690976e181b31c (patch) | |
tree | e39486cb9e72efdcc524ca703e58b25c4e111326 /ui/ui.slider.js | |
parent | 55081dae775c1422552b5b580443e160fb99adf9 (diff) | |
download | jquery-ui-77043b9bf2baf00034463cf9dc690976e181b31c.tar.gz jquery-ui-77043b9bf2baf00034463cf9dc690976e181b31c.zip |
slider: animate option was ignored if only one handle (fixes #4167 slider:animation for single handles broken)
Diffstat (limited to 'ui/ui.slider.js')
-rw-r--r-- | ui/ui.slider.js | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/ui/ui.slider.js b/ui/ui.slider.js index 75109b7f4..a9a9b4cdc 100644 --- a/ui/ui.slider.js +++ b/ui/ui.slider.js @@ -317,7 +317,7 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, { }); var otherVal = this.values(index ? 0 : 1); if (allowed !== false) { - this.values(index, newVal, !( event.type == 'mousedown' && this.options.animate )); + this.values(index, newVal, ( event.type == 'mousedown' && this.options.animate )); } } @@ -362,13 +362,11 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, { }, - values: function(index, newValue, noAnimation) { - - if(!this.options.animate) noAnimation = true; + values: function(index, newValue, animated) { if (arguments.length > 1) { this.options.values[index] = newValue; - this._refreshValue(!noAnimation); + this._refreshValue(animated); this._change(); } @@ -384,7 +382,7 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, { }, - _setData: function(key, value) { + _setData: function(key, value, animated) { $.widget.prototype._setData.apply(this, arguments); @@ -396,10 +394,10 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, { this.element .removeClass("ui-slider-horizontal ui-slider-vertical") .addClass("ui-slider-" + this.orientation); - this._refreshValue(); + this._refreshValue(animated); break; case 'value': - this._refreshValue(); + this._refreshValue(animated); break; } |