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