mirror of
https://github.com/wassname/slider.git
synced 2026-09-12 12:50:45 +08:00
Updates
This commit is contained in:
+11
-3
@@ -258,6 +258,11 @@
|
||||
// shim for using process in browser
|
||||
|
||||
var process = module.exports = {};
|
||||
|
||||
// cached from whatever global is present so that test runners that stub it don't break things.
|
||||
var cachedSetTimeout = setTimeout;
|
||||
var cachedClearTimeout = clearTimeout;
|
||||
|
||||
var queue = [];
|
||||
var draining = false;
|
||||
var currentQueue;
|
||||
@@ -282,7 +287,7 @@
|
||||
if (draining) {
|
||||
return;
|
||||
}
|
||||
var timeout = setTimeout(cleanUpNextTick);
|
||||
var timeout = cachedSetTimeout(cleanUpNextTick);
|
||||
draining = true;
|
||||
|
||||
var len = queue.length;
|
||||
@@ -299,7 +304,7 @@
|
||||
}
|
||||
currentQueue = null;
|
||||
draining = false;
|
||||
clearTimeout(timeout);
|
||||
cachedClearTimeout(timeout);
|
||||
}
|
||||
|
||||
process.nextTick = function (fun) {
|
||||
@@ -311,7 +316,7 @@
|
||||
}
|
||||
queue.push(new Item(fun, args));
|
||||
if (queue.length === 1 && !draining) {
|
||||
setTimeout(drainQueue, 0);
|
||||
cachedSetTimeout(drainQueue, 0);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -19948,6 +19953,9 @@
|
||||
}, {
|
||||
key: 'onMouseDown',
|
||||
value: function onMouseDown(e) {
|
||||
if (e.button !== 0) {
|
||||
return;
|
||||
}
|
||||
var position = getMousePosition(this.props.vertical, e);
|
||||
this.onStart(position);
|
||||
this.addDocumentEvents('mouse');
|
||||
|
||||
Reference in New Issue
Block a user