Add zDirection option to IIIF tile source

This commit is contained in:
Lutz Helm
2019-03-22 12:04:56 +01:00
committed by Lutz Helm
parent b77177ed74
commit 3cf9b5aa28
2 changed files with 10 additions and 0 deletions

View File

@@ -39,6 +39,10 @@ import TileImage from './TileImage.js';
* @property {string} [url] Base URL of the IIIF Image service.
* This shoulf be the same as the IIIF Image @id.
* @property {Versions} [version=Versions.VERSION2] Service's IIIF Image API version.
* @property {number} [zDirection] Indicate which resolution should be used
* by a renderer if the views resolution does not match any resolution of the tile source.
* If 0, the nearest resolution will be used. If 1, the nearest lower resolution
* will be used. If -1, the nearest higher resolution will be used.
*/
function formatPercentage(percentage) {
@@ -242,6 +246,11 @@ class IIIF extends TileImage {
transition: options.transition
});
/**
* @inheritDoc
*/
this.zDirection = options.zDirection;
}
}