Minor documentation and test cleanup.

This commit is contained in:
Aiosa 2024-10-17 13:24:11 +02:00
parent 06ac68d00e
commit bf25e2f069
4 changed files with 2 additions and 13 deletions

View File

@ -2906,6 +2906,7 @@ function OpenSeadragon( options ){
/**
* Promise proxy in OpenSeadragon, enables $.supportsAsync feature.
* This proxy is also necessary because OperaMini does not implement Promises (checks fail).
* @type {PromiseConstructor}
*/
$.Promise = window["Promise"] && $.supportsAsync ? window["Promise"] : class {

View File

@ -435,7 +435,7 @@ $.TileSource.prototype = {
/**
* Responsible for retrieving, and caching the
* 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: providing a parseable string, plain object, or an URL.
* This method is only called by OSD if the TileSource configuration is a non-parseable string (~url).
*
* The string can contain a hash `#` symbol, followed by
@ -727,8 +727,6 @@ $.TileSource.prototype = {
* particularly if you want to use empty TiledImage with client-side derived data
* only. The default tile-cache key is then called "" - an empty string.
*
* todo AIOSA: provide another hash function that maps data onto tiles 1:1 (e.g sobel) or 1:m (vignetting)
*
* Note: default behaviour does not take into account post data.
* @param {Number} level tile level it was fetched with
* @param {Number} x x-coordinate in the pyramid level

View File

@ -50,13 +50,6 @@
ajaxHeaders: {
'X-Viewer-Header': 'ViewerHeaderValue'
},
// TODO: this test proves that tile cacheKey does not change
// with headers change, which by default are part of the key,
// but we cannot automatically update them since users might
// manually change it long before... or can we? The tile gets
// reloaded, so user code should get re-executed. IMHO,
// with tile propagation the best would be throw away old tile
// and start anew
callTileLoadedWithCachedData: true
});
},

View File

@ -350,9 +350,6 @@
const workingc00 = tile00.getCache(tile00._wcKey);
test.notEqual(workingc00, workingc12, "Underlying working cache is not shared despite tiles share hash key.");
//TODO fix test from here
test.ok("TODO: FIX TEST SUITE FOR NEW CACHE SYSTEM");
// now set value with keeping origin
await tile00.setData(42, T_D);
const newCache = tile00.getCache(tile00._wcKey);