r786 - trunk/ui

r786 - trunk/ui


Author: pazu2k@gmail.com
Date: Tue Oct 7 03:33:32 2008
New Revision: 786
Modified:
trunk/ui/ui.spinner.js
Log:
Spinner: fixed incremental:false issue on mousedown (thanks cloudream)
Modified: trunk/ui/ui.spinner.js
==============================================================================
--- trunk/ui/ui.spinner.js    (original)
+++ trunk/ui/ui.spinner.js    Tue Oct 7 03:33:32 2008
@@ -209,7 +209,7 @@
        if (isNaN(this._getValue())) {
            this._setValue(this.options.start);
        }
-        this._setValue(this._getValue() + (d == 'up' ? 1:-1) *
(this.options.incremental && this.counter > 100 ? (this.counter > 200 ?
100 : 10) : 1) * this.options.stepping);
+        this._setValue(this._getValue() + (d == 'up' ? 1:-1)
*(this.options.incremental && this.counter > 100 ? (this.counter > 200 ?
100 : 10) : 1) * this.options.stepping);
        this._animate(d);
        this._constrain();
        if (this.counter) {
@@ -234,7 +234,7 @@
        }
        this.timer = window.setInterval(function() {
            self[d](e);
-            if (self.counter > 20) {
+            if (self.options.incremental && self.counter > 20) {
                self._mousedown(20, d, e);
            }
        }, i);