slider: corrected a regression introduced by commit 5ffd3ab

This commit is contained in:
Richard D. Worth 2010-04-02 10:32:33 -04:00
parent 354682e3eb
commit 51b72a502f

View File

@ -346,7 +346,7 @@ $.widget("ui.slider", $.ui.mouse, {
percentMouse = 1 - percentMouse;
var valueTotal = this._valueMax() - this._valueMin(),
valueMouse = percentMouse * valueTotal;
valueMouse = this._valueMin() + percentMouse * valueTotal;
return this._trimAlignValue(valueMouse);
},
@ -566,7 +566,7 @@ $.widget("ui.slider", $.ui.mouse, {
}
var step = this.options.step,
valModStep = val % step,
alignValue = this._valueMin() + val - valModStep;
alignValue = val - valModStep;
if (valModStep >= (step / 2)) {
alignValue += step;