mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Spinner: fixed incremental:false issue on mousedown (thanks cloudream)
This commit is contained in:
parent
eb3e6499bf
commit
3357c51b18
@ -209,7 +209,7 @@ $.widget('ui.spinner', {
|
|||||||
if (isNaN(this._getValue())) {
|
if (isNaN(this._getValue())) {
|
||||||
this._setValue(this.options.start);
|
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._animate(d);
|
||||||
this._constrain();
|
this._constrain();
|
||||||
if (this.counter) {
|
if (this.counter) {
|
||||||
@ -234,7 +234,7 @@ $.widget('ui.spinner', {
|
|||||||
}
|
}
|
||||||
this.timer = window.setInterval(function() {
|
this.timer = window.setInterval(function() {
|
||||||
self[d](e);
|
self[d](e);
|
||||||
if (self.counter > 20) {
|
if (self.options.incremental && self.counter > 20) {
|
||||||
self._mousedown(20, d, e);
|
self._mousedown(20, d, e);
|
||||||
}
|
}
|
||||||
}, i);
|
}, i);
|
||||||
|
Loading…
Reference in New Issue
Block a user