From 63ecaafa511c3a82fbdc5d75245b72358b9e2ff3 Mon Sep 17 00:00:00 2001 From: Jirka Date: Thu, 20 Jan 2022 18:03:08 +0100 Subject: [PATCH] Update documentation to be more explicit about post data string parameter format. --- src/dzitilesource.js | 2 +- src/iiiftilesource.js | 2 +- src/imageloader.js | 2 +- src/imagetilesource.js | 2 +- src/legacytilesource.js | 2 +- src/osmtilesource.js | 2 +- src/tile.js | 4 ++-- src/tilesource.js | 5 +++-- src/tmstilesource.js | 2 +- src/zoomifytilesource.js | 2 +- 10 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/dzitilesource.js b/src/dzitilesource.js index 633c0371..daed1f80 100644 --- a/src/dzitilesource.js +++ b/src/dzitilesource.js @@ -124,7 +124,7 @@ $.extend( $.DziTileSource.prototype, $.TileSource.prototype, /** @lends OpenSead * @function * @param {Object|XMLDocument} data - the raw configuration * @param {String} url - the url the data was retrieved from if any. - * @param {String} postData - data for the post request or null + * @param {String} postData - HTTP POST data in k=v&k2=v2... form; or null; * @return {Object} options - A dictionary of keyword arguments sufficient * to configure this tile sources constructor. */ diff --git a/src/iiiftilesource.js b/src/iiiftilesource.js index 1bcc565b..dfa10c8e 100644 --- a/src/iiiftilesource.js +++ b/src/iiiftilesource.js @@ -184,7 +184,7 @@ $.extend( $.IIIFTileSource.prototype, $.TileSource.prototype, /** @lends OpenSea * @function * @param {Object} data - the raw configuration * @param {String} url - the url configuration was retrieved from - * @param {String} postData - data for the post request or null + * @param {String} postData - HTTP POST data in k=v&k2=v2... form; or null; * @example IIIF 1.1 Info Looks like this * { * "@context" : "http://library.stanford.edu/iiif/image-api/1.1/context.json", diff --git a/src/imageloader.js b/src/imageloader.js index b48e1d55..dc92e4ea 100644 --- a/src/imageloader.js +++ b/src/imageloader.js @@ -43,7 +43,7 @@ * @param {String} [options.loadWithAjax] - Whether to load this image with AJAX. * @param {String} [options.ajaxHeaders] - Headers to add to the image request if using AJAX. * @param {String} [options.crossOriginPolicy] - CORS policy to use for downloads - * @param {String} [options.postData] - POST parameters or null + * @param {String} [options.postData] - HTTP POST data in k=v&k2=v2... form; or null * @param {Function} [options.callback] - Called once image has been downloaded. * @param {Function} [options.abort] - Called when this image job is aborted. * @param {Number} [options.timeout] - The max number of milliseconds that this image job may take to complete. diff --git a/src/imagetilesource.js b/src/imagetilesource.js index cc0d2619..462c33a4 100644 --- a/src/imagetilesource.js +++ b/src/imagetilesource.js @@ -89,7 +89,7 @@ * @function * @param {Object} options - the options * @param {String} dataUrl - the url the image was retrieved from, if any. - * @param {String} postData - data for the post request or null + * @param {String} postData - HTTP POST data in k=v&k2=v2... form; or null * @return {Object} options - A dictionary of keyword arguments sufficient * to configure this tile sources constructor. */ diff --git a/src/legacytilesource.js b/src/legacytilesource.js index cdf0cbc9..ab544eb1 100644 --- a/src/legacytilesource.js +++ b/src/legacytilesource.js @@ -122,7 +122,7 @@ $.extend( $.LegacyTileSource.prototype, $.TileSource.prototype, /** @lends OpenS * @function * @param {Object|XMLDocument} configuration - the raw configuration * @param {String} dataUrl - the url the data was retrieved from if any. - * @param {String} postData - data for the post request or null + * @param {String} postData - HTTP POST data in k=v&k2=v2... form; or null * @return {Object} options - A dictionary of keyword arguments sufficient * to configure this tile sources constructor. */ diff --git a/src/osmtilesource.js b/src/osmtilesource.js index d5a11163..fcfe5c30 100644 --- a/src/osmtilesource.js +++ b/src/osmtilesource.js @@ -122,7 +122,7 @@ $.extend( $.OsmTileSource.prototype, $.TileSource.prototype, /** @lends OpenSead * @function * @param {Object} data - the raw configuration * @param {String} url - the url the data was retrieved from if any. - * @param {String} postData - data for the post request or null + * @param {String} postData - HTTP POST data in k=v&k2=v2... form; or null * @return {Object} options - A dictionary of keyword arguments sufficient * to configure this tile sources constructor. */ diff --git a/src/tile.js b/src/tile.js index ba4a5575..a427e137 100644 --- a/src/tile.js +++ b/src/tile.js @@ -50,7 +50,7 @@ * @param {Boolean} loadWithAjax Whether this tile image should be loaded with an AJAX request . * @param {Object} ajaxHeaders The headers to send with this tile's AJAX request (if applicable). * @param {OpenSeadragon.Rect} sourceBounds The portion of the tile to use as the source of the - * @param {String} postData post parameters or null + * @param {String} postData HTTP POST data in k=v&k2=v2... form; or null * drawing operation, in pixels. Note that this only works when drawing with canvas; when drawing * with HTML the entire tile is always used. */ @@ -101,7 +101,7 @@ $.Tile = function(level, x, y, bounds, exists, url, context2D, loadWithAjax, aja /** * Post parameters for this tile. Either it is an URL-encoded string * in k1=v1&k2=v2... format or null - * @member {String} postData + * @member {String} postData HTTP POST data in k=v&k2=v2... form; or null * @memberof OpenSeadragon.Tile# */ this.postData = postData; diff --git a/src/tilesource.js b/src/tilesource.js index c6517fda..60535eea 100644 --- a/src/tilesource.js +++ b/src/tilesource.js @@ -550,7 +550,7 @@ $.TileSource.prototype = { * @property {OpenSeadragon.TileSource} eventSource - A reference to the TileSource which raised the event. * @property {String} message * @property {String} source - * @property {String} postData or null + * @property {String} postData - HTTP POST data in k=v&k2=v2... form; or null * @property {?Object} userData - Arbitrary subscriber-defined object. */ _this.raiseEvent( 'open-failed', { @@ -593,7 +593,8 @@ $.TileSource.prototype = { * @param {String|Object|Array|Document} data * @param {String} url - the url the data was loaded * from if any. - * @param {String} postData value obtained from the url after '#' sign or null + * @param {String} postData - HTTP POST data in k=v&k2=v2... form; or null; value obtained from + * the protocol URL after '#' sign if flag splitHashDataForPost set to 'true' * @return {Object} options - A dictionary of keyword arguments sufficient * to configure the tile source constructor (include all values you want to * instantiate the TileSource subclass with - what _options_ object should contain). diff --git a/src/tmstilesource.js b/src/tmstilesource.js index 355ffa99..e9eef83b 100644 --- a/src/tmstilesource.js +++ b/src/tmstilesource.js @@ -111,7 +111,7 @@ $.extend( $.TmsTileSource.prototype, $.TileSource.prototype, /** @lends OpenSead * @function * @param {Object} data - the raw configuration * @param {String} url - the url the data was retrieved from if any. - * @param {String} postData - data for the post request or null + * @param {String} postData - HTTP POST data in k=v&k2=v2... form; or null * @return {Object} options - A dictionary of keyword arguments sufficient * to configure this tile sources constructor. */ diff --git a/src/zoomifytilesource.js b/src/zoomifytilesource.js index 540b2695..ce90aba8 100644 --- a/src/zoomifytilesource.js +++ b/src/zoomifytilesource.js @@ -122,7 +122,7 @@ * @function * @param {Object} data - the raw configuration * @param {String} url - the url the data was retrieved from if any. - * @param {String} postData - data for the post request or null + * @param {String} postData - HTTP POST data in k=v&k2=v2... form; or null * @return {Object} options - A dictionary of keyword arguments sufficient * to configure this tile sources constructor. */