1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-03 14:59:18 +02:00

throttle check on scroll

This commit is contained in:
Fred Chasen 2015-05-17 23:59:32 -04:00
parent 83650961f8
commit a574c68975
4 changed files with 100 additions and 46 deletions

View file

@ -51,9 +51,8 @@ EPUBJS.Queue.prototype.dequeue = function(){
if(this._q.length) {
inwait = this._q.shift();
task = inwait.task;
//console.log(task)
if(task){
// Task is a function that returns a promise
return task.apply(this.context, inwait.args).then(function(){
inwait.deferred.resolve.apply(inwait.context || this.context, arguments);