From cfe88663aab01522b0cfda4d82921acc1e730682 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Mon, 7 May 2018 15:41:33 -0600 Subject: [PATCH] Update type annotations in examples --- examples/blend-modes.js | 4 ++-- examples/canvas-gradient-pattern.js | 2 +- examples/center.js | 2 +- examples/custom-interactions.js | 4 ++-- examples/d3.js | 4 ++-- examples/export-pdf.js | 2 +- examples/measure.js | 4 ++-- examples/xyz-retina.html | 2 +- examples/zoomslider.js | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/examples/blend-modes.js b/examples/blend-modes.js index c1fe4d0ff5..a5391ece72 100644 --- a/examples/blend-modes.js +++ b/examples/blend-modes.js @@ -114,7 +114,7 @@ const resetBlendModeFromSelect = function(evt) { /** * Bind the pre- and postcompose handlers to the passed layer. * - * @param {ol.layer.Vector} layer The layer to bind the handlers to. + * @param {module:ol/layer/Vector} layer The layer to bind the handlers to. */ const bindLayerListeners = function(layer) { layer.on('precompose', setBlendModeFromSelect); @@ -125,7 +125,7 @@ const bindLayerListeners = function(layer) { /** * Unind the pre- and postcompose handlers to the passed layers. * - * @param {ol.layer.Vector} layer The layer to unbind the handlers from. + * @param {module:ol/layer/Vector} layer The layer to unbind the handlers from. */ const unbindLayerListeners = function(layer) { layer.un('precompose', setBlendModeFromSelect); diff --git a/examples/canvas-gradient-pattern.js b/examples/canvas-gradient-pattern.js index 33dc59f75a..3c8348f0dc 100644 --- a/examples/canvas-gradient-pattern.js +++ b/examples/canvas-gradient-pattern.js @@ -70,7 +70,7 @@ const style = new Style({ * * @param {module:ol/Feature~Feature} feature The feature to style. * @param {number} resolution Resolution. - * @return {ol.style.Style} The style to use for the feature. + * @return {module:ol/style/Style} The style to use for the feature. */ const getStackedStyle = function(feature, resolution) { const id = feature.getId(); diff --git a/examples/center.js b/examples/center.js index 9988cf43ce..441693f212 100644 --- a/examples/center.js +++ b/examples/center.js @@ -87,6 +87,6 @@ const centerlausanne = document.getElementById('centerlausanne'); centerlausanne.addEventListener('click', function() { const feature = source.getFeatures()[1]; const point = /** @type {module:ol/geom/Point~Point} */ (feature.getGeometry()); - const size = /** @type {ol.Size} */ (map.getSize()); + const size = /** @type {module:ol/size~Size} */ (map.getSize()); view.centerOn(point.getCoordinates(), size, [570, 500]); }, false); diff --git a/examples/custom-interactions.js b/examples/custom-interactions.js index 93df5dc2be..56a5c67177 100644 --- a/examples/custom-interactions.js +++ b/examples/custom-interactions.js @@ -17,7 +17,7 @@ const app = {}; /** * @constructor - * @extends {ol.interaction.Pointer} + * @extends {module:ol/interaction/Pointer} */ app.Drag = function() { @@ -29,7 +29,7 @@ app.Drag = function() { }); /** - * @type {ol.Pixel} + * @type {module:ol~Pixel} * @private */ this.coordinate_ = null; diff --git a/examples/d3.js b/examples/d3.js index d26aaffb13..3776d11f2f 100644 --- a/examples/d3.js +++ b/examples/d3.js @@ -31,10 +31,10 @@ d3.json('data/topojson/us.json', function(error, us) { /** * This function uses d3 to render the topojson features to a canvas. - * @param {ol.Extent} extent Extent. + * @param {module:ol/extent~Extent} extent Extent. * @param {number} resolution Resolution. * @param {number} pixelRatio Pixel ratio. - * @param {ol.Size} size Size. + * @param {module:ol/size~Size} size Size. * @param {module:ol/proj/Projection~Projection} projection Projection. * @return {HTMLCanvasElement} A canvas element. */ diff --git a/examples/export-pdf.js b/examples/export-pdf.js index 47fe27e56f..3e9993ea35 100644 --- a/examples/export-pdf.js +++ b/examples/export-pdf.js @@ -64,7 +64,7 @@ exportButton.addEventListener('click', function() { const dim = dims[format]; const width = Math.round(dim[0] * resolution / 25.4); const height = Math.round(dim[1] * resolution / 25.4); - const size = /** @type {ol.Size} */ (map.getSize()); + const size = /** @type {module:ol/size~Size} */ (map.getSize()); const extent = map.getView().calculateExtent(size); const source = raster.getSource(); diff --git a/examples/measure.js b/examples/measure.js index d7d6b37ea7..dd79dbaa66 100644 --- a/examples/measure.js +++ b/examples/measure.js @@ -52,7 +52,7 @@ let helpTooltipElement; /** * Overlay to show the help messages. - * @type {ol.Overlay} + * @type {module:ol/Overlay} */ let helpTooltip; @@ -66,7 +66,7 @@ let measureTooltipElement; /** * Overlay to show the measurement. - * @type {ol.Overlay} + * @type {module:ol/Overlay} */ let measureTooltip; diff --git a/examples/xyz-retina.html b/examples/xyz-retina.html index 07fb7dcc5b..b0c613b0ba 100644 --- a/examples/xyz-retina.html +++ b/examples/xyz-retina.html @@ -3,7 +3,7 @@ layout: example.html title: XYZ Retina Tiles shortdesc: Example of Retina / HiDPI mercator tiles (512x512px) available as XYZ. docs: > - The ol.source.XYZ must contain `tilePixelRatio` parameter. The tiles were prepared from a GeoTIFF file with [MapTiler](http://www.maptiler.com/). + The XYZ source accepts a `tilePixelRatio` option. The tiles were prepared from a GeoTIFF file with [MapTiler](http://www.maptiler.com/). tags: "retina, hidpi, xyz, maptiler, @2x, devicePixelRatio" ---
diff --git a/examples/zoomslider.js b/examples/zoomslider.js index 33e53e599d..b020b2f444 100644 --- a/examples/zoomslider.js +++ b/examples/zoomslider.js @@ -9,7 +9,7 @@ import OSM from '../src/ol/source/OSM.js'; * Helper method for map-creation. * * @param {string} divId The id of the div for the map. - * @return {ol.PluggableMap} The map instance. + * @return {module:ol/PluggableMap} The map instance. */ function createMap(divId) { const source = new OSM();