From b82f5cea768cecf45e72fc23cf0f452e708ef858 Mon Sep 17 00:00:00 2001 From: Philip Giuliani Date: Fri, 19 Dec 2014 15:50:19 +0100 Subject: [PATCH] Fixed imageLoaderLimit Currently jobsInProgress was not incremented after adding a job. So it has gone into the - range and was like unlimited jobs. --- src/imageLoader.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/imageLoader.js b/src/imageLoader.js index 0fa658a2..3cab4cdd 100644 --- a/src/imageLoader.js +++ b/src/imageLoader.js @@ -133,7 +133,7 @@ $.ImageLoader.prototype = /** @lends OpenSeadragon.ImageLoader.prototype */{ this.jobsInProgress++; } else { - this.jobQueue.push( newJob ); + this.jobQueue.push( newJob ); } }, @@ -162,6 +162,7 @@ function completeJob( loader, job, callback ) { if ( (!loader.jobLimit || loader.jobsInProgress < loader.jobLimit) && loader.jobQueue.length > 0) { nextJob = loader.jobQueue.shift(); nextJob.start(); + loader.jobsInProgress++; } callback( job.image );