mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 14:46:10 +03:00
parent
d85d4d492d
commit
c737bad66e
@ -94,14 +94,16 @@ ImageJob.prototype = {
|
||||
* @memberof OpenSeadragon
|
||||
* @classdesc Handles downloading of a set of images using asynchronous queue pattern.
|
||||
* You generally won't have to interact with the ImageLoader directly.
|
||||
* @param {Object} options - Options for this ImageLoader.
|
||||
* @param {Number} options.jobLimit - The number of concurrent image requests.
|
||||
*/
|
||||
$.ImageLoader = function() {
|
||||
$.ImageLoader = function( options ) {
|
||||
|
||||
$.extend( true, this, {
|
||||
jobLimit: $.DEFAULT_SETTINGS.imageLoaderLimit,
|
||||
jobQueue: [],
|
||||
jobsInProgress: 0
|
||||
});
|
||||
}, options );
|
||||
|
||||
};
|
||||
|
||||
@ -166,4 +168,3 @@ function completeJob( loader, job, callback ) {
|
||||
}
|
||||
|
||||
}( OpenSeadragon ));
|
||||
|
||||
|
@ -436,7 +436,9 @@ $.Viewer = function( options ) {
|
||||
this.viewport.setHomeBounds(this.world.getHomeBounds(), this.world.getContentFactor());
|
||||
|
||||
// Create the image loader
|
||||
this.imageLoader = new $.ImageLoader();
|
||||
this.imageLoader = new $.ImageLoader({
|
||||
jobLimit: this.imageLoaderLimit
|
||||
});
|
||||
|
||||
// Create the tile cache
|
||||
this.tileCache = new $.TileCache({
|
||||
|
Loading…
Reference in New Issue
Block a user