Update documentation and minor cleanup.

This commit is contained in:
Aiosa 2024-10-05 11:50:21 +02:00
parent e3af370832
commit 2033814227
5 changed files with 8 additions and 14 deletions

View File

@ -48,6 +48,6 @@
"test": "grunt test", "test": "grunt test",
"prepare": "grunt build", "prepare": "grunt build",
"build": "grunt build", "build": "grunt build",
"dev": "grunt connect watch" "dev": "grunt dev"
} }
} }

View File

@ -373,7 +373,7 @@ $.DataTypeConvertor = class {
} }
/** /**
* Destroy the data item given. * Copy the data item given.
* @param {OpenSeadragon.Tile} tile * @param {OpenSeadragon.Tile} tile
* @param {any} data data item to convert * @param {any} data data item to convert
* @param {string} type data type * @param {string} type data type

View File

@ -436,10 +436,11 @@ $.TileSource.prototype = {
* Responsible for retrieving, and caching the * Responsible for retrieving, and caching the
* image metadata pertinent to this TileSources implementation. * image metadata pertinent to this TileSources implementation.
* There are three scenarios of opening a tile source: * There are three scenarios of opening a tile source:
* 1) if it is a string parseable as XML or JSON, the string is converted to an object * This method is only called by OSD if the TileSource configuration is a non-parseable string (~url).
* 2) if it is a string, then *
* internally, this method * The string can contain a hash `#` symbol, followed by
* else * key=value arguments. If this is the case, this method sends this
* data as a POST body.
* *
* @function * @function
* @param {String} url * @param {String} url

View File

@ -1584,7 +1584,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
* A set of headers to include when making tile AJAX requests. * A set of headers to include when making tile AJAX requests.
* Note that these headers will be merged over any headers specified in {@link OpenSeadragon.Options}. * Note that these headers will be merged over any headers specified in {@link OpenSeadragon.Options}.
* Specifying a falsy value for a header will clear its existing value set at the Viewer level (if any). * Specifying a falsy value for a header will clear its existing value set at the Viewer level (if any).
* @param {Function} [options.success] A function tadhat gets called when the image is * @param {Function} [options.success] A function that gets called when the image is
* successfully added. It's passed the event object which contains a single property: * successfully added. It's passed the event object which contains a single property:
* "item", which is the resulting instance of TiledImage. * "item", which is the resulting instance of TiledImage.
* @param {Function} [options.error] A function that gets called if the image is * @param {Function} [options.error] A function that gets called if the image is

View File

@ -17,12 +17,6 @@
if (!$) { if (!$) {
throw new Error('OpenSeadragon is missing.'); throw new Error('OpenSeadragon is missing.');
} }
// Requires OpenSeadragon >=2.1
if (!$.version || $.version.major < 2 ||
$.version.major === 2 && $.version.minor < 1) {
throw new Error(
'Filtering plugin requires OpenSeadragon version >= 2.1');
}
$.Viewer.prototype.setFilterOptions = function(options) { $.Viewer.prototype.setFilterOptions = function(options) {
if (!this.filterPluginInstance) { if (!this.filterPluginInstance) {
@ -81,7 +75,6 @@
await processors[i](contextCopy); await processors[i](contextCopy);
} }
tile._filterIncrement = self.filterIncrement;
await tile.setData(contextCopy, 'context2d'); await tile.setData(contextCopy, 'context2d');
} }
}; };