From 6444e6989d3e49ebf4106c2db3a1e5204c03a175 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Wed, 6 Jun 2018 15:40:47 +0200 Subject: [PATCH] Add missing properties in option typedef --- src/ol/Graticule.js | 6 +++++- src/ol/control/OverviewMap.js | 4 ++-- src/ol/interaction/DragAndDrop.js | 4 ++-- src/ol/source/ImageMapGuide.js | 4 ++++ src/ol/source/VectorTile.js | 2 ++ src/ol/source/XYZ.js | 2 +- 6 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/ol/Graticule.js b/src/ol/Graticule.js index 2005938013..af0e44f3eb 100644 --- a/src/ol/Graticule.js +++ b/src/ol/Graticule.js @@ -61,6 +61,10 @@ const INTERVALS = [ * longitudes. This function is called with the longitude as argument, and * should return a formatted string representing the longitude. By default, * labels are formatted as degrees, minutes, seconds and hemisphere. + * @property {function(number):string} [latLabelFormatter] Label formatter for + * latitudes. This function is called with the latitude as argument, and + * should return a formatted string representing the latitude. By default, + * labels are formatted as degrees, minutes, seconds and hemisphere. * @property {number} [lonLabelPosition=0] Longitude label position in fractions * (0..1) of view extent. 0 means at the bottom of the viewport, 1 means at the * top. @@ -85,7 +89,7 @@ const INTERVALS = [ * Note that the default's `textBaseline` configuration will not work well for * `lonLabelPosition` configurations that position labels close to the top of * the viewport. - * @param {module:ol/style/Text} [latLabelStyle] Latitude label text style. + * @property {module:ol/style/Text} [latLabelStyle] Latitude label text style. * If not provided, the following style will be used: * ```js * new Text({ diff --git a/src/ol/control/OverviewMap.js b/src/ol/control/OverviewMap.js index 3fe04a8013..f77dff54d2 100644 --- a/src/ol/control/OverviewMap.js +++ b/src/ol/control/OverviewMap.js @@ -38,8 +38,8 @@ const MIN_RATIO = 0.1; /** * @typedef {Object} Options - * @property {boolean} [collapsed=true] Whether the control should start collapsed - * or not (expanded). + * @property {string} [className='ol-overviewmap'] CSS class name. + * @property {boolean} [collapsed=true] Whether the control should start collapsed or not (expanded). * @property {string|Element} [collapseLabel='«'] Text label to use for the * expanded overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used. * @property {boolean} [collapsible=true] Whether the control can be collapsed or not. diff --git a/src/ol/interaction/DragAndDrop.js b/src/ol/interaction/DragAndDrop.js index 4656a5b24c..49a5c88e53 100644 --- a/src/ol/interaction/DragAndDrop.js +++ b/src/ol/interaction/DragAndDrop.js @@ -135,7 +135,7 @@ inherits(DragAndDrop, Interaction); /** - * @param {Event} event Event. + * @param {DragEvent} event Event. * @this {module:ol/interaction/DragAndDrop} */ function handleDrop(event) { @@ -150,7 +150,7 @@ function handleDrop(event) { /** - * @param {Event} event Event. + * @param {DragEvent} event Event. */ function handleStop(event) { event.stopPropagation(); diff --git a/src/ol/source/ImageMapGuide.js b/src/ol/source/ImageMapGuide.js index 7762990b69..2e10a17056 100644 --- a/src/ol/source/ImageMapGuide.js +++ b/src/ol/source/ImageMapGuide.js @@ -13,6 +13,10 @@ import {appendParams} from '../uri.js'; /** * @typedef {Object} Options * @property {string} [url] The mapagent url. + * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that + * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to + * access pixel data with the Canvas renderer. See + * {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image} for more detail. * @property {number} [displayDpi=96] The display resolution. * @property {number} [metersPerUnit=1] The meters-per-unit value. * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting diff --git a/src/ol/source/VectorTile.js b/src/ol/source/VectorTile.js index 6ee376c2cf..964182a0ba 100644 --- a/src/ol/source/VectorTile.js +++ b/src/ol/source/VectorTile.js @@ -44,6 +44,8 @@ import {createXYZ, extentFromProjection, createForProjection} from '../tilegrid. * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders. * A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be * used instead of defining each one separately in the `urls` option. + * @property {number} [transition] A duration for tile opacity + * transitions in milliseconds. A duration of 0 disables the opacity transition. * @property {Array.} [urls] An array of URL templates. * @property {boolean} [wrapX=true] Whether to wrap the world horizontally. * When set to `false`, only one world diff --git a/src/ol/source/XYZ.js b/src/ol/source/XYZ.js index 6638ea53ff..69e60d2672 100644 --- a/src/ol/source/XYZ.js +++ b/src/ol/source/XYZ.js @@ -18,7 +18,7 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js'; * @property {boolean} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels). * Higher values can increase reprojection performance, but decrease precision. * @property {number} [maxZoom=18] Optional max zoom level. - * @property {number} [maxZoom=0] Optional min zoom level. + * @property {number} [minZoom=0] Optional min zoom level. * @property {module:ol/tilegrid/TileGrid} [tileGrid] Tile grid. * @property {module:ol/Tile~LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is * ```js