From c7ac9502bd0f6e4c48d078fc7b865d142db4ab9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 29 Sep 2014 16:28:50 +0200 Subject: [PATCH 1/4] More restrictive type for ol.style.Circle#getImage --- src/ol/style/circlestyle.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ol/style/circlestyle.js b/src/ol/style/circlestyle.js index 7f9c268541..0d209ba876 100644 --- a/src/ol/style/circlestyle.js +++ b/src/ol/style/circlestyle.js @@ -120,7 +120,8 @@ ol.style.Circle.prototype.getHitDetectionImage = function(pixelRatio) { /** - * @inheritDoc + * @param {number} pixelRatio Pixel ratio. + * @return {HTMLCanvasElement} Canvas element. * @api */ ol.style.Circle.prototype.getImage = function(pixelRatio) { From 4c0bfd89058f747b7d00e3e81bf93a5936eb31fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 29 Sep 2014 16:29:40 +0200 Subject: [PATCH 2/4] More restrictive type for ol.style.Icon#getImage --- src/ol/style/iconstyle.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ol/style/iconstyle.js b/src/ol/style/iconstyle.js index e7f20f2120..c82881420a 100644 --- a/src/ol/style/iconstyle.js +++ b/src/ol/style/iconstyle.js @@ -228,7 +228,8 @@ ol.style.Icon.prototype.getAnchor = function() { /** - * @inheritDoc + * @param {number} pixelRatio Pixel ratio. + * @return {Image} Image element. * @api */ ol.style.Icon.prototype.getImage = function(pixelRatio) { From af7944ef42d1ae56729a7cc6335cb8ae8c6b5d49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 29 Sep 2014 16:30:17 +0200 Subject: [PATCH 3/4] Mark ol.style.Image with @api This is to be able to do `imageStyle instanceof ol.style.Image` in applications. --- src/ol/style/imagestyle.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ol/style/imagestyle.js b/src/ol/style/imagestyle.js index 2f57b34337..1c48da71d7 100644 --- a/src/ol/style/imagestyle.js +++ b/src/ol/style/imagestyle.js @@ -26,10 +26,12 @@ ol.style.ImageOptions; /** * @classdesc - * Set image style for vector features. + * Abstract base class; used for creating subclasses and not instantiated in + * apps. Base class for {@link ol.style.Icon} and {@link ol.style.Circle}. * * @constructor * @param {ol.style.ImageOptions} options Options. + * @api */ ol.style.Image = function(options) { From ddbc1d260c2c8b191417da0ac4b26c488608d78b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 29 Sep 2014 16:31:36 +0200 Subject: [PATCH 4/4] Mark ol.style.Image#getImage with @api --- src/ol/style/imagestyle.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ol/style/imagestyle.js b/src/ol/style/imagestyle.js index 1c48da71d7..35c3a3ac16 100644 --- a/src/ol/style/imagestyle.js +++ b/src/ol/style/imagestyle.js @@ -121,6 +121,7 @@ ol.style.Image.prototype.getAnchor = goog.abstractMethod; * @function * @param {number} pixelRatio Pixel ratio. * @return {HTMLCanvasElement|HTMLVideoElement|Image} Image element. + * @api */ ol.style.Image.prototype.getImage = goog.abstractMethod;