]> source.dussan.org Git - jquery-ui.git/commitdiff
slider: corrected a regression introduced by commit 5ffd3ab
authorRichard D. Worth <rdworth@gmail.com>
Fri, 2 Apr 2010 14:32:33 +0000 (10:32 -0400)
committerRichard D. Worth <rdworth@gmail.com>
Fri, 2 Apr 2010 14:32:33 +0000 (10:32 -0400)
ui/jquery.ui.slider.js

index 84d19ccf5e5e2451f7deafb07c6f54f760114f88..7f891bae8f39901171829e5dd9ee7cf625b1b84c 100644 (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;