r2087 - trunk/ui
r2087 - trunk/ui
Author: paul.bakaus
Date: Tue Feb 17 03:13:30 2009
New Revision: 2087
Modified:
trunk/ui/ui.slider.js
Log:
slider: animate option was ignored if only one handle (fixes #4167
slider:animation for single handles broken)
Modified: trunk/ui/ui.slider.js
==============================================================================
--- trunk/ui/ui.slider.js (original)
+++ trunk/ui/ui.slider.js Tue Feb 17 03:13:30 2009
@@ -317,7 +317,7 @@
});
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 @@
},
- 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 @@
},
- _setData: function(key, value) {
+ _setData: function(key, value, animated) {
$.widget.prototype._setData.apply(this, arguments);
@@ -396,10 +394,10 @@
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;
}