mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-28 16:16:08 +03:00
Fixed imageLoaderLimit
Currently jobsInProgress was not incremented after adding a job. So it has gone into the - range and was like unlimited jobs.
This commit is contained in:
parent
c737bad66e
commit
b82f5cea76
@ -133,7 +133,7 @@ $.ImageLoader.prototype = /** @lends OpenSeadragon.ImageLoader.prototype */{
|
|||||||
this.jobsInProgress++;
|
this.jobsInProgress++;
|
||||||
}
|
}
|
||||||
else {
|
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) {
|
if ( (!loader.jobLimit || loader.jobsInProgress < loader.jobLimit) && loader.jobQueue.length > 0) {
|
||||||
nextJob = loader.jobQueue.shift();
|
nextJob = loader.jobQueue.shift();
|
||||||
nextJob.start();
|
nextJob.start();
|
||||||
|
loader.jobsInProgress++;
|
||||||
}
|
}
|
||||||
|
|
||||||
callback( job.image );
|
callback( job.image );
|
||||||
|
Loading…
Reference in New Issue
Block a user