diff --git a/src/ol/Image.js b/src/ol/Image.js index bef1e6c89e..ac9f4e8f82 100644 --- a/src/ol/Image.js +++ b/src/ol/Image.js @@ -50,7 +50,7 @@ const ImageWrapper = function(extent, resolution, pixelRatio, src, crossOrigin, /** * @private - * @type {HTMLCanvasElement|Image|HTMLVideoElement} + * @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} */ this.image_ = new Image(); if (crossOrigin !== null) { @@ -139,7 +139,7 @@ ImageWrapper.prototype.load = function() { /** - * @param {HTMLCanvasElement|Image|HTMLVideoElement} image Image. + * @param {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image. */ ImageWrapper.prototype.setImage = function(image) { this.image_ = image; diff --git a/src/ol/ImageBase.js b/src/ol/ImageBase.js index a8a780d104..1f557906cf 100644 --- a/src/ol/ImageBase.js +++ b/src/ol/ImageBase.js @@ -65,7 +65,7 @@ ImageBase.prototype.getExtent = function() { /** * @abstract - * @return {HTMLCanvasElement|Image|HTMLVideoElement} Image. + * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image. */ ImageBase.prototype.getImage = function() {}; diff --git a/src/ol/ImageTile.js b/src/ol/ImageTile.js index 5e7d0d62db..2e9748c87d 100644 --- a/src/ol/ImageTile.js +++ b/src/ol/ImageTile.js @@ -44,7 +44,7 @@ const ImageTile = function(tileCoord, state, src, crossOrigin, tileLoadFunction, /** * @private - * @type {Image|HTMLCanvasElement} + * @type {HTMLImageElement|HTMLCanvasElement} */ this.image_ = new Image(); if (crossOrigin !== null) { diff --git a/src/ol/render/canvas/ImageReplay.js b/src/ol/render/canvas/ImageReplay.js index 27f5b80f9c..c17d3f2e44 100644 --- a/src/ol/render/canvas/ImageReplay.js +++ b/src/ol/render/canvas/ImageReplay.js @@ -29,13 +29,13 @@ const CanvasImageReplay = function( /** * @private - * @type {HTMLCanvasElement|HTMLVideoElement|Image} + * @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} */ this.hitDetectionImage_ = null; /** * @private - * @type {HTMLCanvasElement|HTMLVideoElement|Image} + * @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} */ this.image_ = null; diff --git a/src/ol/render/canvas/Immediate.js b/src/ol/render/canvas/Immediate.js index c3e3b94782..e27881e1f5 100644 --- a/src/ol/render/canvas/Immediate.js +++ b/src/ol/render/canvas/Immediate.js @@ -100,7 +100,7 @@ const CanvasImmediateRenderer = function(context, pixelRatio, extent, transform, /** * @private - * @type {HTMLCanvasElement|HTMLVideoElement|Image} + * @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} */ this.image_ = null; diff --git a/src/ol/render/canvas/Replay.js b/src/ol/render/canvas/Replay.js index e252521dd4..c54c63edec 100644 --- a/src/ol/render/canvas/Replay.js +++ b/src/ol/render/canvas/Replay.js @@ -652,7 +652,7 @@ CanvasReplay.prototype.replay_ = function( case CanvasInstruction.DRAW_IMAGE: d = /** @type {number} */ (instruction[1]); dd = /** @type {number} */ (instruction[2]); - image = /** @type {HTMLCanvasElement|HTMLVideoElement|Image} */ + image = /** @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} */ (instruction[3]); // Remaining arguments in DRAW_IMAGE are in alphabetical order anchorX = /** @type {number} */ (instruction[4]); diff --git a/src/ol/renderer/canvas/IntermediateCanvas.js b/src/ol/renderer/canvas/IntermediateCanvas.js index a86897399d..2ccfdb8feb 100644 --- a/src/ol/renderer/canvas/IntermediateCanvas.js +++ b/src/ol/renderer/canvas/IntermediateCanvas.js @@ -83,7 +83,7 @@ IntermediateCanvasRenderer.prototype.composeFrame = function(frameState, layerSt /** * @abstract - * @return {HTMLCanvasElement|HTMLVideoElement|Image} Canvas. + * @return {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} Canvas. */ IntermediateCanvasRenderer.prototype.getImage = function() {}; diff --git a/src/ol/reproj.js b/src/ol/reproj.js index f466536014..a6bbdc8b22 100644 --- a/src/ol/reproj.js +++ b/src/ol/reproj.js @@ -84,7 +84,7 @@ function enlargeClipPoint(centroidX, centroidY, x, y) { * @param {module:ol/reproj/Triangulation} triangulation * Calculated triangulation. * @param {Array.<{extent: module:ol/extent~Extent, - * image: (HTMLCanvasElement|Image|HTMLVideoElement)}>} sources + * image: (HTMLCanvasElement|HTMLImageElement|HTMLVideoElement)}>} sources * Array of sources. * @param {number} gutter Gutter of the sources. * @param {boolean=} opt_renderEdges Render reprojection edges. diff --git a/src/ol/source/UTFGrid.js b/src/ol/source/UTFGrid.js index f5f7490425..854acd8639 100644 --- a/src/ol/source/UTFGrid.js +++ b/src/ol/source/UTFGrid.js @@ -80,7 +80,7 @@ inherits(CustomTile, Tile); /** * Get the image element for this tile. - * @return {Image} Image. + * @return {HTMLImageElement} Image. */ CustomTile.prototype.getImage = function() { return null; diff --git a/src/ol/style/Icon.js b/src/ol/style/Icon.js index d9857d44a2..6f5adcfa28 100644 --- a/src/ol/style/Icon.js +++ b/src/ol/style/Icon.js @@ -29,7 +29,7 @@ import ImageStyle from '../style/Image.js'; * @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 {Image|HTMLCanvasElement} [img] Image object for the icon. If the `src` option is not provided then the + * @property {HTMLImageElement|HTMLCanvasElement} [img] Image object for the icon. If the `src` option is not provided then the * provided image must already be loaded. And in that case, it is required * to provide the size of the image, with the `imgSize` option. * @property {Array.} [offset=[0, 0]] Offset, which, together with the size and the offset origin, define the @@ -106,7 +106,7 @@ const Icon = function(opt_options) { options.crossOrigin !== undefined ? options.crossOrigin : null; /** - * @type {Image|HTMLCanvasElement} + * @type {HTMLImageElement|HTMLCanvasElement} */ const image = options.img !== undefined ? options.img : null; @@ -299,7 +299,7 @@ Icon.prototype.getColor = function() { /** * Get the image icon. * @param {number} pixelRatio Pixel ratio. - * @return {Image|HTMLCanvasElement} Image or Canvas element. + * @return {HTMLImageElement|HTMLCanvasElement} Image or Canvas element. * @override * @api */ diff --git a/src/ol/style/IconImage.js b/src/ol/style/IconImage.js index 65286a9356..1f73fc88ea 100644 --- a/src/ol/style/IconImage.js +++ b/src/ol/style/IconImage.js @@ -11,7 +11,7 @@ import {shared as iconImageCache} from '../style/IconImageCache.js'; /** * @constructor - * @param {Image|HTMLCanvasElement} image Image. + * @param {HTMLImageElement|HTMLCanvasElement} image Image. * @param {string|undefined} src Src. * @param {module:ol/size~Size} size Size. * @param {?string} crossOrigin Cross origin. @@ -25,13 +25,13 @@ const IconImage = function(image, src, size, crossOrigin, imageState, color) { /** * @private - * @type {Image|HTMLCanvasElement} + * @type {HTMLImageElement|HTMLCanvasElement} */ this.hitDetectionImage_ = null; /** * @private - * @type {Image|HTMLCanvasElement} + * @type {HTMLImageElement|HTMLCanvasElement} */ this.image_ = !image ? new Image() : image; @@ -92,7 +92,7 @@ inherits(IconImage, EventTarget); /** - * @param {Image|HTMLCanvasElement} image Image. + * @param {HTMLImageElement|HTMLCanvasElement} image Image. * @param {string} src Src. * @param {module:ol/size~Size} size Size. * @param {?string} crossOrigin Cross origin. @@ -161,7 +161,7 @@ IconImage.prototype.handleImageLoad_ = function() { /** * @param {number} pixelRatio Pixel ratio. - * @return {Image|HTMLCanvasElement} Image or Canvas element. + * @return {HTMLImageElement|HTMLCanvasElement} Image or Canvas element. */ IconImage.prototype.getImage = function(pixelRatio) { return this.canvas_ ? this.canvas_ : this.image_; @@ -178,7 +178,7 @@ IconImage.prototype.getImageState = function() { /** * @param {number} pixelRatio Pixel ratio. - * @return {Image|HTMLCanvasElement} Image element. + * @return {HTMLImageElement|HTMLCanvasElement} Image element. */ IconImage.prototype.getHitDetectionImage = function(pixelRatio) { if (!this.hitDetectionImage_) { diff --git a/src/ol/style/Image.js b/src/ol/style/Image.js index 290a082a5a..95665a7b67 100644 --- a/src/ol/style/Image.js +++ b/src/ol/style/Image.js @@ -122,7 +122,7 @@ ImageStyle.prototype.getAnchor = function() {}; * Get the image element for the symbolizer. * @abstract * @param {number} pixelRatio Pixel ratio. - * @return {HTMLCanvasElement|HTMLVideoElement|Image} Image element. + * @return {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} Image element. */ ImageStyle.prototype.getImage = function(pixelRatio) {}; @@ -130,7 +130,7 @@ ImageStyle.prototype.getImage = function(pixelRatio) {}; /** * @abstract * @param {number} pixelRatio Pixel ratio. - * @return {HTMLCanvasElement|HTMLVideoElement|Image} Image element. + * @return {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} Image element. */ ImageStyle.prototype.getHitDetectionImage = function(pixelRatio) {};