From 81693cefbf8f8ecd214430e57cee215d8874c1de Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 19 Apr 2018 18:00:14 -0600 Subject: [PATCH] Correct type for Icon options --- examples/custom-interactions.js | 2 +- examples/icon-color.js | 6 +++--- examples/icon-negative.js | 2 +- examples/icon.js | 2 +- test/rendering/ol/style/icon.test.js | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/custom-interactions.js b/examples/custom-interactions.js index b051076246..0bffd948ed 100644 --- a/examples/custom-interactions.js +++ b/examples/custom-interactions.js @@ -157,7 +157,7 @@ const map = new Map({ features: [pointFeature, lineFeature, polygonFeature] }), style: new Style({ - image: new Icon(/** @type {olx.style.IconOptions} */ ({ + image: new Icon(/** @type {module:ol/style/Icon~Options} */ ({ anchor: [0.5, 46], anchorXUnits: 'fraction', anchorYUnits: 'pixels', diff --git a/examples/icon-color.js b/examples/icon-color.js index edb046729f..6fe97ff803 100644 --- a/examples/icon-color.js +++ b/examples/icon-color.js @@ -24,7 +24,7 @@ const madrid = new Feature({ }); rome.setStyle(new Style({ - image: new Icon(/** @type {olx.style.IconOptions} */ ({ + image: new Icon(/** @type {module:ol/style/Icon~Options} */ ({ color: '#8959A8', crossOrigin: 'anonymous', src: 'data/dot.png' @@ -32,7 +32,7 @@ rome.setStyle(new Style({ })); london.setStyle(new Style({ - image: new Icon(/** @type {olx.style.IconOptions} */ ({ + image: new Icon(/** @type {module:ol/style/Icon~Options} */ ({ color: '#4271AE', crossOrigin: 'anonymous', src: 'data/dot.png' @@ -40,7 +40,7 @@ london.setStyle(new Style({ })); madrid.setStyle(new Style({ - image: new Icon(/** @type {olx.style.IconOptions} */ ({ + image: new Icon(/** @type {module:ol/style/Icon~Options} */ ({ color: [113, 140, 0], crossOrigin: 'anonymous', src: 'data/dot.png' diff --git a/examples/icon-negative.js b/examples/icon-negative.js index e1c2482f9d..94f7ea3633 100644 --- a/examples/icon-negative.js +++ b/examples/icon-negative.js @@ -13,7 +13,7 @@ import Style from '../src/ol/style/Style.js'; function createStyle(src, img) { return new Style({ - image: new Icon(/** @type {olx.style.IconOptions} */ ({ + image: new Icon(/** @type {module:ol/style/Icon~Options} */ ({ anchor: [0.5, 0.96], crossOrigin: 'anonymous', src: src, diff --git a/examples/icon.js b/examples/icon.js index 1367939e29..934a164376 100644 --- a/examples/icon.js +++ b/examples/icon.js @@ -19,7 +19,7 @@ const iconFeature = new Feature({ }); const iconStyle = new Style({ - image: new Icon(/** @type {olx.style.IconOptions} */ ({ + image: new Icon(/** @type {module:ol/style/Icon~Options} */ ({ anchor: [0.5, 46], anchorXUnits: 'fraction', anchorYUnits: 'pixels', diff --git a/test/rendering/ol/style/icon.test.js b/test/rendering/ol/style/icon.test.js index df1566db8d..07013b69d8 100644 --- a/test/rendering/ol/style/icon.test.js +++ b/test/rendering/ol/style/icon.test.js @@ -58,7 +58,7 @@ describe('ol.rendering.style.Icon', function() { img.onload = function() { imgInfo.img = img; feature.setStyle(new Style({ - image: new Icon(/** @type {olx.style.IconOptions} */ (imgInfo)) + image: new Icon(/** @type {module:ol/style/Icon~Options} */ (imgInfo)) })); vectorSource.addFeature(feature); callback();