Update description for zDirection

This commit is contained in:
mike-000
2021-07-02 16:24:52 +01:00
parent b0fa916571
commit 07ea4ac1c8
6 changed files with 21 additions and 27 deletions

View File

@@ -43,10 +43,9 @@ import {toSize} from '../size.js';
* @property {string} [url] Base URL of the IIIF Image service. * @property {string} [url] Base URL of the IIIF Image service.
* This should be the same as the IIIF Image ID. * This should be the same as the IIIF Image ID.
* @property {import("../format/IIIFInfo.js").Versions} [version=Versions.VERSION2] Service's IIIF Image API version. * @property {import("../format/IIIFInfo.js").Versions} [version=Versions.VERSION2] Service's IIIF Image API version.
* @property {number} [zDirection=0] Indicate which resolution should be used * @property {number|import("../array.js").NearestDirectionFunction} [zDirection=0]
* by a renderer if the view resolution does not match any resolution of the tile source. * Choose whether to use tiles with a higher or lower zoom level when between integer
* If 0, the nearest resolution will be used. If 1, the nearest lower resolution * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.
* will be used. If -1, the nearest higher resolution will be used.
*/ */
function formatPercentage(percentage) { function formatPercentage(percentage) {
@@ -346,7 +345,7 @@ class IIIF extends TileImage {
}); });
/** /**
* @type {number} * @type {number|import("../array.js").NearestDirectionFunction}
*/ */
this.zDirection = options.zDirection; this.zDirection = options.zDirection;
} }

View File

@@ -11,11 +11,10 @@ import {toSize} from '../size.js';
* @property {import("../proj.js").ProjectionLike} [projection='EPSG:3857'] Optional projection. * @property {import("../proj.js").ProjectionLike} [projection='EPSG:3857'] Optional projection.
* @property {import("../tilegrid/TileGrid.js").default} [tileGrid] Tile grid. * @property {import("../tilegrid/TileGrid.js").default} [tileGrid] Tile grid.
* @property {boolean} [wrapX=true] Whether to wrap the world horizontally. * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.
* @property {number} [zDirection=0] Set to `1` when debugging `VectorTile` sources with * @property {number|import("../array.js").NearestDirectionFunction} [zDirection=0]
* a default configuration. Indicates which resolution should be used by a renderer if * Set to `1` when debugging `VectorTile` sources with a default configuration.
* the view resolution does not match any resolution of the tile source. If 0, the nearest * Choose whether to use tiles with a higher or lower zoom level when between integer
* resolution will be used. If 1, the nearest lower resolution will be used. If -1, the * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.
* nearest higher resolution will be used.
* @property {string} [template='z:{z} x:{x} y:{y}'] Template for labeling the tiles. * @property {string} [template='z:{z} x:{x} y:{y}'] Template for labeling the tiles.
* Should include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders. * Should include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.
*/ */

View File

@@ -53,10 +53,9 @@ import {getUid} from '../util.js';
* @property {number} [transition] Duration of the opacity transition for rendering. * @property {number} [transition] Duration of the opacity transition for rendering.
* To disable the opacity transition, pass `transition: 0`. * To disable the opacity transition, pass `transition: 0`.
* @property {string} [key] Optional tile key for proper cache fetching * @property {string} [key] Optional tile key for proper cache fetching
* @property {number} [zDirection=0] Indicate which resolution should be used * @property {number|import("../array.js").NearestDirectionFunction} [zDirection=0]
* by a renderer if the view resolution does not match any resolution of the tile source. * Choose whether to use tiles with a higher or lower zoom level when between integer
* If 0, the nearest resolution will be used. If 1, the nearest lower resolution * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.
* will be used. If -1, the nearest higher resolution will be used.
*/ */
/** /**

View File

@@ -83,10 +83,9 @@ import {toSize} from '../size.js';
* When set to `false`, only one world * When set to `false`, only one world
* will be rendered. When set to `true`, tiles will be wrapped horizontally to * will be rendered. When set to `true`, tiles will be wrapped horizontally to
* render multiple worlds. * render multiple worlds.
* @property {number} [zDirection=1] Indicate which resolution should be used * @property {number|import("../array.js").NearestDirectionFunction} [zDirection=1]
* by a renderer if the view resolution does not match any resolution of the tile source. * Choose whether to use tiles with a higher or lower zoom level when between integer
* If 0, the nearest resolution will be used. If 1, the nearest lower resolution * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.
* will be used. If -1, the nearest higher resolution will be used.
*/ */
/** /**

View File

@@ -44,10 +44,9 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
* @property {boolean} [wrapX=true] Whether to wrap the world horizontally. * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.
* @property {number} [transition=250] Duration of the opacity transition for rendering. * @property {number} [transition=250] Duration of the opacity transition for rendering.
* To disable the opacity transition, pass `transition: 0`. * To disable the opacity transition, pass `transition: 0`.
* @property {number} [zDirection=0] Indicate which resolution should be used * @property {number|import("../array.js").NearestDirectionFunction} [zDirection=0]
* by a renderer if the view resolution does not match any resolution of the tile source. * Choose whether to use tiles with a higher or lower zoom level when between integer
* If 0, the nearest resolution will be used. If 1, the nearest lower resolution * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.
* will be used. If -1, the nearest higher resolution will be used.
*/ */
/** /**

View File

@@ -113,10 +113,9 @@ export class CustomTile extends ImageTile {
* @property {number} [transition] Duration of the opacity transition for rendering. * @property {number} [transition] Duration of the opacity transition for rendering.
* To disable the opacity transition, pass `transition: 0`. * To disable the opacity transition, pass `transition: 0`.
* @property {number} [tileSize=256] Tile size. Same tile size is used for all zoom levels. * @property {number} [tileSize=256] Tile size. Same tile size is used for all zoom levels.
* @property {number} [zDirection] Indicate which resolution should be used * @property {number|import("../array.js").NearestDirectionFunction} [zDirection=0]
* by a renderer if the views resolution does not match any resolution of the tile source. * Choose whether to use tiles with a higher or lower zoom level when between integer
* If 0, the nearest resolution will be used. If 1, the nearest lower resolution * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.
* will be used. If -1, the nearest higher resolution will be used.
*/ */
/** /**
@@ -272,7 +271,7 @@ class Zoomify extends TileImage {
}); });
/** /**
* @type {number} * @type {number|import("../array.js").NearestDirectionFunction}
*/ */
this.zDirection = options.zDirection; this.zDirection = options.zDirection;