Documents the new OpenSeadragon.setAjaxLoaderLimit method.

This commit is contained in:
Chili Johnson 2023-03-30 11:40:57 -07:00
parent 3b0857b545
commit 3020243d04

View File

@ -1472,12 +1472,17 @@ function OpenSeadragon( options ){
* Global settings, shared across all viewers. * Global settings, shared across all viewers.
* @static * @static
* @type {Object} * @type {Object}
* @property {Number} ajaxLoaderLimit The maximum number of ajax requests to make concurrently. By default it is set to 0 allowing an unlimited number of concurrent requests. * @property {Number} ajaxLoaderLimit The maximum number of AJAX requests to make concurrently. By default it is set to 0 allowing an unlimited number of concurrent requests.
*/ */
settings: { settings: {
ajaxLoaderLimit: 0 ajaxLoaderLimit: 0
}, },
/**
* Sets the global concurrency limit for AJAX requests
* @function
* @param {Number} maxNumAjaxRequests The maximum number of AJAX requests to make concurrently. Setting this to 0 will allow an unlimited number of requests.
*/
setAjaxLoaderLimit: function ( maxNumAjaxRequests ) { setAjaxLoaderLimit: function ( maxNumAjaxRequests ) {
if( maxNumAjaxRequests < 0) { if( maxNumAjaxRequests < 0) {
throw new Error("The ajax loader limit must be >= 0"); throw new Error("The ajax loader limit must be >= 0");