mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-02-16 23:03:13 +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
|
* it is set to 0 allowing the browser to make the maximum number of
|
||||||
* image requests in parallel as allowed by the browsers policy.
|
* 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]
|
* @property {Number} [clickTimeThreshold=300]
|
||||||
* The number of milliseconds within which a pointer down-up event combination
|
* The number of milliseconds within which a pointer down-up event combination
|
||||||
* will be treated as a click gesture.
|
* will be treated as a click gesture.
|
||||||
@ -792,7 +796,7 @@ function OpenSeadragon( options ){
|
|||||||
requestFuncs: [],
|
requestFuncs: [],
|
||||||
numRequests: 0,
|
numRequests: 0,
|
||||||
numActiveRequests: 0,
|
numActiveRequests: 0,
|
||||||
maxConcurrency: 50,
|
maxConcurrency: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1339,6 +1343,7 @@ function OpenSeadragon( options ){
|
|||||||
|
|
||||||
//PERFORMANCE SETTINGS
|
//PERFORMANCE SETTINGS
|
||||||
imageLoaderLimit: 0,
|
imageLoaderLimit: 0,
|
||||||
|
tileSourceLoaderLimit: 0,
|
||||||
maxImageCacheCount: 200,
|
maxImageCacheCount: 200,
|
||||||
timeout: 30000,
|
timeout: 30000,
|
||||||
useCanvas: true, // Use canvas element for drawing if available
|
useCanvas: true, // Use canvas element for drawing if available
|
||||||
@ -2339,6 +2344,10 @@ function OpenSeadragon( options ){
|
|||||||
},
|
},
|
||||||
|
|
||||||
queueAjaxRequest: function (request, sendRequestFunc) {
|
queueAjaxRequest: function (request, sendRequestFunc) {
|
||||||
|
if(!$.ajaxQueue.maxConcurrency) {
|
||||||
|
sendRequestFunc();
|
||||||
|
}
|
||||||
|
|
||||||
var oldOnStateChange = request.onreadystatechange;
|
var oldOnStateChange = request.onreadystatechange;
|
||||||
|
|
||||||
var onCompleteRequest = function() {
|
var onCompleteRequest = function() {
|
||||||
|
@ -394,6 +394,10 @@ $.Viewer = function( options ) {
|
|||||||
timeout: options.timeout
|
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
|
// Create the tile cache
|
||||||
this.tileCache = new $.TileCache({
|
this.tileCache = new $.TileCache({
|
||||||
maxImageCacheCount: this.maxImageCacheCount
|
maxImageCacheCount: this.maxImageCacheCount
|
||||||
|
Loading…
x
Reference in New Issue
Block a user