From 3020243d04331c72f4333963983239e350e9b501 Mon Sep 17 00:00:00 2001 From: Chili Johnson Date: Thu, 30 Mar 2023 11:40:57 -0700 Subject: [PATCH] Documents the new `OpenSeadragon.setAjaxLoaderLimit` method. --- src/openseadragon.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/openseadragon.js b/src/openseadragon.js index 806291f5..899cdfe8 100644 --- a/src/openseadragon.js +++ b/src/openseadragon.js @@ -1472,12 +1472,17 @@ function OpenSeadragon( options ){ * Global settings, shared across all viewers. * @static * @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: { 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 ) { if( maxNumAjaxRequests < 0) { throw new Error("The ajax loader limit must be >= 0");