Make updateAjaxHeaders private

This commit is contained in:
Uwe Schmidt 2023-05-19 22:22:10 +02:00
parent e983bd8108
commit 4060dee4f9
3 changed files with 7 additions and 8 deletions

View File

@ -1033,24 +1033,22 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
}
this._ownAjaxHeaders = ajaxHeaders;
this.updateAjaxHeaders(propagate);
this._updateAjaxHeaders(propagate);
},
/**
* Update headers to include when making AJAX requests.
*
* This function has the same effect as calling {@link OpenSeadragon.TiledImage#setAjaxHeaders},
* expect that the headers for this tiled image do not change. This is especially useful
* except that the headers for this tiled image do not change. This is especially useful
* for propagating updated headers from {@link OpenSeadragon.TileSource#getTileAjaxHeaders}
* to existing tiles.
*
* Note that `TiledImage.ajaxHeaders` might still change if {@link OpenSeadragon.Viewer#setAjaxHeaders}
* was previously called without propagating the updated headers (not recommended).
*
* @private
* @function
* @param {Boolean} [propagate=true] Whether to propagate updated headers to existing tiles and queued image loader jobs.
*/
updateAjaxHeaders: function(propagate) {
_updateAjaxHeaders: function(propagate) {
if (propagate === undefined) {
propagate = true;
}

View File

@ -665,7 +665,8 @@ $.TileSource.prototype = {
* TiledImage level (if any).
*
* Note that the headers of existing tiles don't automatically change when this function
* returns updated headers. To do that, you need to call {@link OpenSeadragon.TiledImage#updateAjaxHeaders}.
* returns updated headers. To do that, you need to call {@link OpenSeadragon.Viewer#setAjaxHeaders}
* and propagate the changes.
*
* @function
* @param {Number} level

View File

@ -1010,7 +1010,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
if (propagate) {
for (var i = 0; i < this.world.getItemCount(); i++) {
this.world.getItemAt(i).updateAjaxHeaders(true);
this.world.getItemAt(i)._updateAjaxHeaders(true);
}
if (this.navigator) {