mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 13:16:10 +03:00
Passes the tileSourceLoaderLimit option through the viewer constructor.
This commit is contained in:
parent
4227e4fd9b
commit
55bb9cd3d1
@ -312,6 +312,10 @@
|
||||
* it is set to 0 allowing the browser to make the maximum number of
|
||||
* image requests in parallel as allowed by the browsers policy.
|
||||
*
|
||||
* @property {Number} [tileSourceLoaderLimit=0]
|
||||
* The maximum number of tile source requests to make concurrently. By default
|
||||
* it is set to 0 allowing an unlimited number of concurrent requests.
|
||||
*
|
||||
* @property {Number} [clickTimeThreshold=300]
|
||||
* The number of milliseconds within which a pointer down-up event combination
|
||||
* will be treated as a click gesture.
|
||||
@ -792,7 +796,7 @@ function OpenSeadragon( options ){
|
||||
requestFuncs: [],
|
||||
numRequests: 0,
|
||||
numActiveRequests: 0,
|
||||
maxConcurrency: 50,
|
||||
maxConcurrency: 0,
|
||||
};
|
||||
|
||||
/**
|
||||
@ -1339,6 +1343,7 @@ function OpenSeadragon( options ){
|
||||
|
||||
//PERFORMANCE SETTINGS
|
||||
imageLoaderLimit: 0,
|
||||
tileSourceLoaderLimit: 0,
|
||||
maxImageCacheCount: 200,
|
||||
timeout: 30000,
|
||||
useCanvas: true, // Use canvas element for drawing if available
|
||||
@ -2339,6 +2344,10 @@ function OpenSeadragon( options ){
|
||||
},
|
||||
|
||||
queueAjaxRequest: function (request, sendRequestFunc) {
|
||||
if(!$.ajaxQueue.maxConcurrency) {
|
||||
sendRequestFunc();
|
||||
}
|
||||
|
||||
var oldOnStateChange = request.onreadystatechange;
|
||||
|
||||
var onCompleteRequest = function() {
|
||||
|
@ -394,6 +394,10 @@ $.Viewer = function( options ) {
|
||||
timeout: options.timeout
|
||||
});
|
||||
|
||||
// TODO: Instantiating a viewer shouldn't have
|
||||
// a side effect on the global queue
|
||||
$.ajaxQueue.maxConcurrency = options.tileSourceLoaderLimit;
|
||||
|
||||
// Create the tile cache
|
||||
this.tileCache = new $.TileCache({
|
||||
maxImageCacheCount: this.maxImageCacheCount
|
||||
|
Loading…
Reference in New Issue
Block a user