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/Overlay.js b/src/ol/Overlay.js index 8b32f30e62..102fa04685 100644 --- a/src/ol/Overlay.js +++ b/src/ol/Overlay.js @@ -15,7 +15,7 @@ import {containsExtent} from './extent.js'; * @typedef {Object} Options * @property {number|string} [id] Set the overlay id. The overlay id can be used * with the {@link module:ol/Map~Map#getOverlayById} method. - * @property {Element} [element] The overlay element. + * @property {HTMLElement} [element] The overlay element. * @property {Array.} [offset=[0, 0]] Offsets in pixels used when positioning * the overlay. The first element in the * array is the horizontal offset. A positive value shifts the overlay right. @@ -129,7 +129,7 @@ const Overlay = function(options) { /** * @protected - * @type {Element} + * @type {HTMLElement} */ this.element = document.createElement('DIV'); this.element.className = options.className !== undefined ? @@ -218,12 +218,12 @@ inherits(Overlay, BaseObject); /** * Get the DOM element of this overlay. - * @return {Element|undefined} The Element containing the overlay. + * @return {HTMLElement|undefined} The Element containing the overlay. * @observable * @api */ Overlay.prototype.getElement = function() { - return /** @type {Element|undefined} */ (this.get(Property.ELEMENT)); + return /** @type {HTMLElement|undefined} */ (this.get(Property.ELEMENT)); }; @@ -364,7 +364,7 @@ Overlay.prototype.handlePositioningChanged = function() { /** * Set the DOM element to be associated with this overlay. - * @param {Element|undefined} element The Element containing the overlay. + * @param {HTMLElement|undefined} element The Element containing the overlay. * @observable * @api */ @@ -422,7 +422,7 @@ Overlay.prototype.panIntoView = function() { } const mapRect = this.getRect(map.getTargetElement(), map.getSize()); - const element = /** @type {!Element} */ (this.getElement()); + const element = this.getElement(); const overlayRect = this.getRect(element, [outerWidth(element), outerHeight(element)]); const margin = this.autoPanMargin; @@ -469,7 +469,7 @@ Overlay.prototype.panIntoView = function() { /** * Get the extent of an element relative to the document - * @param {Element|undefined} element The element. + * @param {HTMLElement|undefined} element The element. * @param {module:ol/size~Size|undefined} size The size of the element. * @return {module:ol/extent~Extent} The extent. * @protected diff --git a/src/ol/PluggableMap.js b/src/ol/PluggableMap.js index 2fb008dbb1..665c412f37 100644 --- a/src/ol/PluggableMap.js +++ b/src/ol/PluggableMap.js @@ -76,7 +76,7 @@ import {create as createTransform, apply as applyTransform} from './transform.js * @typedef {Object} MapOptionsInternal * @property {module:ol/Collection.} [controls] * @property {module:ol/Collection.} [interactions] - * @property {Element|Document} keyboardEventTarget + * @property {HTMLElement|Document} keyboardEventTarget * @property {module:ol/Collection.} overlays * @property {Object.} values */ @@ -93,7 +93,7 @@ import {create as createTransform, apply as applyTransform} from './transform.js * @property {module:ol/Collection.|Array.} [interactions] * Interactions that are initially added to the map. If not specified, * {@link module:ol/interaction~defaults} is used. - * @property {Element|Document|string} [keyboardEventTarget] The element to + * @property {HTMLElement|Document|string} [keyboardEventTarget] The element to * listen to keyboard events on. This determines when the `KeyboardPan` and * `KeyboardZoom` interactions trigger. For example, if this option is set to * `document` the keyboard interactions will always trigger. If this option is @@ -120,7 +120,7 @@ import {create as createTransform, apply as applyTransform} from './transform.js * Increasing this value can make it easier to click on the map. * @property {module:ol/Collection.|Array.} [overlays] * Overlays initially added to the map. By default, no overlays are added. - * @property {Element|string} [target] The container for the map, either the + * @property {HTMLElement|string} [target] The container for the map, either the * element itself or the `id` of the element. If not specified at construction * time, {@link module:ol/Map~Map#setTarget} must be called for the map to be * rendered. @@ -240,7 +240,7 @@ const PluggableMap = function(options) { /** * @private - * @type {Element} + * @type {!HTMLElement} */ this.viewport_ = document.createElement('DIV'); this.viewport_.className = 'ol-viewport' + (TOUCH ? ' ol-touch' : ''); @@ -254,7 +254,7 @@ const PluggableMap = function(options) { /** * @private - * @type {!Element} + * @type {!HTMLElement} */ this.overlayContainer_ = document.createElement('DIV'); this.overlayContainer_.className = 'ol-overlaycontainer'; @@ -262,7 +262,7 @@ const PluggableMap = function(options) { /** * @private - * @type {!Element} + * @type {!HTMLElement} */ this.overlayContainerStopEvent_ = document.createElement('DIV'); this.overlayContainerStopEvent_.className = 'ol-overlaycontainer-stopevent'; @@ -293,7 +293,7 @@ const PluggableMap = function(options) { /** * @private - * @type {Element|Document} + * @type {HTMLElement|Document} */ this.keyboardEventTarget_ = optionsInternal.keyboardEventTarget; @@ -685,13 +685,13 @@ PluggableMap.prototype.getEventPixel = function(event) { * Get the target in which this map is rendered. * Note that this returns what is entered as an option or in setTarget: * if that was an element, it returns an element; if a string, it returns that. - * @return {Element|string|undefined} The Element or id of the Element that the + * @return {HTMLElement|string|undefined} The Element or id of the Element that the * map is rendered in. * @observable * @api */ PluggableMap.prototype.getTarget = function() { - return /** @type {Element|string|undefined} */ (this.get(MapProperty.TARGET)); + return /** @type {HTMLElement|string|undefined} */ (this.get(MapProperty.TARGET)); }; @@ -699,7 +699,7 @@ PluggableMap.prototype.getTarget = function() { * Get the DOM element into which this map is rendered. In contrast to * `getTarget` this method always return an `Element`, or `null` if the * map has no target. - * @return {Element} The element that the map is rendered in. + * @return {HTMLElement} The element that the map is rendered in. * @api */ PluggableMap.prototype.getTargetElement = function() { @@ -857,7 +857,7 @@ PluggableMap.prototype.getView = function() { /** * Get the element that serves as the map viewport. - * @return {Element} Viewport. + * @return {HTMLElement} Viewport. * @api */ PluggableMap.prototype.getViewport = function() { @@ -870,7 +870,7 @@ PluggableMap.prototype.getViewport = function() { * this container will let mousedown and touchstart events through to the map, * so clicks and gestures on an overlay will trigger {@link module:ol/MapBrowserEvent~MapBrowserEvent} * events. - * @return {!Element} The map's overlay container. + * @return {!HTMLElement} The map's overlay container. */ PluggableMap.prototype.getOverlayContainer = function() { return this.overlayContainer_; @@ -882,7 +882,7 @@ PluggableMap.prototype.getOverlayContainer = function() { * event propagation. Elements added to this container won't let mousedown and * touchstart events through to the map, so clicks and gestures on an overlay * don't trigger any {@link module:ol/MapBrowserEvent~MapBrowserEvent}. - * @return {!Element} The map's overlay container that stops events. + * @return {!HTMLElement} The map's overlay container that stops events. */ PluggableMap.prototype.getOverlayContainerStopEvent = function() { return this.overlayContainerStopEvent_; @@ -1322,7 +1322,7 @@ PluggableMap.prototype.setSize = function(size) { /** * Set the target element to render this map into. - * @param {Element|string|undefined} target The Element or id of the Element + * @param {HTMLElement|string|undefined} target The Element or id of the Element * that the map is rendered in. * @observable * @api @@ -1398,7 +1398,7 @@ PluggableMap.prototype.unskipFeature = function(feature) { function createOptionsInternal(options) { /** - * @type {Element|Document} + * @type {HTMLElement|Document} */ let keyboardEventTarget = null; if (options.keyboardEventTarget !== undefined) { diff --git a/src/ol/control/Attribution.js b/src/ol/control/Attribution.js index 64b7065ce8..2f000ed2c9 100644 --- a/src/ol/control/Attribution.js +++ b/src/ol/control/Attribution.js @@ -256,7 +256,7 @@ Attribution.prototype.updateElement_ = function(frameState) { /** - * @param {Event} event The event to handle + * @param {MouseEvent} event The event to handle * @private */ Attribution.prototype.handleClick_ = function(event) { diff --git a/src/ol/control/FullScreen.js b/src/ol/control/FullScreen.js index 2a1f7b2d1b..74b0459f40 100644 --- a/src/ol/control/FullScreen.js +++ b/src/ol/control/FullScreen.js @@ -136,7 +136,7 @@ inherits(FullScreen, Control); /** - * @param {Event} event The event to handle + * @param {MouseEvent} event The event to handle * @private */ FullScreen.prototype.handleClick_ = function(event) { diff --git a/src/ol/control/OverviewMap.js b/src/ol/control/OverviewMap.js index 46878ca856..6241ff3374 100644 --- a/src/ol/control/OverviewMap.js +++ b/src/ol/control/OverviewMap.js @@ -498,7 +498,7 @@ OverviewMap.prototype.calculateCoordinateRotate_ = function( /** - * @param {Event} event The event to handle + * @param {MouseEvent} event The event to handle * @private */ OverviewMap.prototype.handleClick_ = function(event) { diff --git a/src/ol/control/Rotate.js b/src/ol/control/Rotate.js index 3ef8d413f6..8d73e37ab4 100644 --- a/src/ol/control/Rotate.js +++ b/src/ol/control/Rotate.js @@ -113,7 +113,7 @@ inherits(Rotate, Control); /** - * @param {Event} event The event to handle + * @param {MouseEvent} event The event to handle * @private */ Rotate.prototype.handleClick_ = function(event) { diff --git a/src/ol/control/ScaleLine.js b/src/ol/control/ScaleLine.js index 57287dd5f7..732cb73419 100644 --- a/src/ol/control/ScaleLine.js +++ b/src/ol/control/ScaleLine.js @@ -72,14 +72,14 @@ const ScaleLine = function(opt_options) { /** * @private - * @type {Element} + * @type {HTMLElement} */ this.innerElement_ = document.createElement('DIV'); this.innerElement_.className = className + '-inner'; /** * @private - * @type {Element} + * @type {HTMLElement} */ this.element_ = document.createElement('DIV'); this.element_.className = className + ' ' + CLASS_UNSELECTABLE; diff --git a/src/ol/control/Zoom.js b/src/ol/control/Zoom.js index 09bb800c1c..235e216d80 100644 --- a/src/ol/control/Zoom.js +++ b/src/ol/control/Zoom.js @@ -98,7 +98,7 @@ inherits(Zoom, Control); /** * @param {number} delta Zoom delta. - * @param {Event} event The event to handle + * @param {MouseEvent} event The event to handle * @private */ Zoom.prototype.handleClick_ = function(delta, event) { diff --git a/src/ol/control/ZoomSlider.js b/src/ol/control/ZoomSlider.js index 567c4bd660..982e946c08 100644 --- a/src/ol/control/ZoomSlider.js +++ b/src/ol/control/ZoomSlider.js @@ -227,7 +227,7 @@ export function render(mapEvent) { /** - * @param {Event} event The browser event to handle. + * @param {MouseEvent} event The browser event to handle. * @private */ ZoomSlider.prototype.handleContainerClick_ = function(event) { diff --git a/src/ol/control/ZoomToExtent.js b/src/ol/control/ZoomToExtent.js index 5007605f09..49c8cf1b8b 100644 --- a/src/ol/control/ZoomToExtent.js +++ b/src/ol/control/ZoomToExtent.js @@ -68,7 +68,7 @@ inherits(ZoomToExtent, Control); /** - * @param {Event} event The event to handle + * @param {MouseEvent} event The event to handle * @private */ ZoomToExtent.prototype.handleClick_ = function(event) { diff --git a/src/ol/dom.js b/src/ol/dom.js index 52c46ada47..3ba69fc737 100644 --- a/src/ol/dom.js +++ b/src/ol/dom.js @@ -25,7 +25,7 @@ export function createCanvasContext2D(opt_width, opt_height) { * Get the current computed width for the given element including margin, * padding and border. * Equivalent to jQuery's `$(el).outerWidth(true)`. - * @param {!Element} element Element. + * @param {!HTMLElement} element Element. * @return {number} The width. */ export function outerWidth(element) { @@ -41,7 +41,7 @@ export function outerWidth(element) { * Get the current computed height for the given element including margin, * padding and border. * Equivalent to jQuery's `$(el).outerHeight(true)`. - * @param {!Element} element Element. + * @param {!HTMLElement} element Element. * @return {number} The height. */ export function outerHeight(element) { diff --git a/src/ol/pointer/MouseSource.js b/src/ol/pointer/MouseSource.js index 8db1313423..f9a00a40ce 100644 --- a/src/ol/pointer/MouseSource.js +++ b/src/ol/pointer/MouseSource.js @@ -106,7 +106,7 @@ const DEDUP_DIST = 25; * or detect that the positions are invalid. * * @private - * @param {Event} inEvent The in event. + * @param {MouseEvent} inEvent The in event. * @return {boolean} True, if the event was generated by a touch. */ MouseSource.prototype.isEventSimulatedFromTouch_ = function(inEvent) { @@ -154,7 +154,7 @@ function prepareEvent(inEvent, dispatcher) { /** * Handler for `mousedown`. * - * @param {Event} inEvent The in event. + * @param {MouseEvent} inEvent The in event. */ MouseSource.prototype.mousedown = function(inEvent) { if (!this.isEventSimulatedFromTouch_(inEvent)) { @@ -173,7 +173,7 @@ MouseSource.prototype.mousedown = function(inEvent) { /** * Handler for `mousemove`. * - * @param {Event} inEvent The in event. + * @param {MouseEvent} inEvent The in event. */ MouseSource.prototype.mousemove = function(inEvent) { if (!this.isEventSimulatedFromTouch_(inEvent)) { @@ -186,7 +186,7 @@ MouseSource.prototype.mousemove = function(inEvent) { /** * Handler for `mouseup`. * - * @param {Event} inEvent The in event. + * @param {MouseEvent} inEvent The in event. */ MouseSource.prototype.mouseup = function(inEvent) { if (!this.isEventSimulatedFromTouch_(inEvent)) { @@ -204,7 +204,7 @@ MouseSource.prototype.mouseup = function(inEvent) { /** * Handler for `mouseover`. * - * @param {Event} inEvent The in event. + * @param {MouseEvent} inEvent The in event. */ MouseSource.prototype.mouseover = function(inEvent) { if (!this.isEventSimulatedFromTouch_(inEvent)) { @@ -217,7 +217,7 @@ MouseSource.prototype.mouseover = function(inEvent) { /** * Handler for `mouseout`. * - * @param {Event} inEvent The in event. + * @param {MouseEvent} inEvent The in event. */ MouseSource.prototype.mouseout = function(inEvent) { if (!this.isEventSimulatedFromTouch_(inEvent)) { diff --git a/src/ol/pointer/TouchSource.js b/src/ol/pointer/TouchSource.js index 8615e1242c..fd54196370 100644 --- a/src/ol/pointer/TouchSource.js +++ b/src/ol/pointer/TouchSource.js @@ -131,7 +131,7 @@ TouchSource.prototype.setPrimaryTouch_ = function(inTouch) { /** * @private - * @param {Object} inPointer The in pointer object. + * @param {PointerEvent} inPointer The in pointer object. */ TouchSource.prototype.removePrimaryPointer_ = function(inPointer) { if (inPointer.isPrimary) { @@ -172,9 +172,9 @@ TouchSource.prototype.cancelResetClickCount_ = function() { /** * @private - * @param {Event} browserEvent Browser event + * @param {TouchEvent} browserEvent Browser event * @param {Touch} inTouch Touch event - * @return {Object} A pointer object. + * @return {PointerEvent} A pointer object. */ TouchSource.prototype.touchToPointer_ = function(browserEvent, inTouch) { const e = this.dispatcher.cloneEvent(browserEvent, inTouch); @@ -208,8 +208,8 @@ TouchSource.prototype.touchToPointer_ = function(browserEvent, inTouch) { /** * @private - * @param {Event} inEvent Touch event - * @param {function(Event, Object)} inFunction In function. + * @param {TouchEvent} inEvent Touch event + * @param {function(TouchEvent, PointerEvent)} inFunction In function. */ TouchSource.prototype.processTouches_ = function(inEvent, inFunction) { const touches = Array.prototype.slice.call(inEvent.changedTouches); @@ -253,7 +253,7 @@ TouchSource.prototype.findTouch_ = function(touchList, searchId) { * this "abandoned" touch * * @private - * @param {Event} inEvent The in event. + * @param {TouchEvent} inEvent The in event. */ TouchSource.prototype.vacuumTouches_ = function(inEvent) { const touchList = inEvent.touches; @@ -284,7 +284,7 @@ TouchSource.prototype.vacuumTouches_ = function(inEvent) { * Handler for `touchstart`, triggers `pointerover`, * `pointerenter` and `pointerdown` events. * - * @param {Event} inEvent The in event. + * @param {TouchEvent} inEvent The in event. */ TouchSource.prototype.touchstart = function(inEvent) { this.vacuumTouches_(inEvent); @@ -297,8 +297,8 @@ TouchSource.prototype.touchstart = function(inEvent) { /** * @private - * @param {Event} browserEvent The event. - * @param {Object} inPointer The in pointer object. + * @param {TouchEvent} browserEvent The event. + * @param {PointerEvent} inPointer The in pointer object. */ TouchSource.prototype.overDown_ = function(browserEvent, inPointer) { this.pointerMap[inPointer.pointerId] = { @@ -315,7 +315,7 @@ TouchSource.prototype.overDown_ = function(browserEvent, inPointer) { /** * Handler for `touchmove`. * - * @param {Event} inEvent The in event. + * @param {TouchEvent} inEvent The in event. */ TouchSource.prototype.touchmove = function(inEvent) { inEvent.preventDefault(); @@ -325,8 +325,8 @@ TouchSource.prototype.touchmove = function(inEvent) { /** * @private - * @param {Event} browserEvent The event. - * @param {Object} inPointer The in pointer. + * @param {TouchEvent} browserEvent The event. + * @param {PointerEvent} inPointer The in pointer. */ TouchSource.prototype.moveOverOut_ = function(browserEvent, inPointer) { const event = inPointer; @@ -362,7 +362,7 @@ TouchSource.prototype.moveOverOut_ = function(browserEvent, inPointer) { * Handler for `touchend`, triggers `pointerup`, * `pointerout` and `pointerleave` events. * - * @param {Event} inEvent The event. + * @param {TouchEvent} inEvent The event. */ TouchSource.prototype.touchend = function(inEvent) { this.dedupSynthMouse_(inEvent); @@ -372,8 +372,8 @@ TouchSource.prototype.touchend = function(inEvent) { /** * @private - * @param {Event} browserEvent An event. - * @param {Object} inPointer The inPointer object. + * @param {TouchEvent} browserEvent An event. + * @param {PointerEvent} inPointer The inPointer object. */ TouchSource.prototype.upOut_ = function(browserEvent, inPointer) { this.dispatcher.up(inPointer, browserEvent); @@ -387,7 +387,7 @@ TouchSource.prototype.upOut_ = function(browserEvent, inPointer) { * Handler for `touchcancel`, triggers `pointercancel`, * `pointerout` and `pointerleave` events. * - * @param {Event} inEvent The in event. + * @param {TouchEvent} inEvent The in event. */ TouchSource.prototype.touchcancel = function(inEvent) { this.processTouches_(inEvent, this.cancelOut_); @@ -396,8 +396,8 @@ TouchSource.prototype.touchcancel = function(inEvent) { /** * @private - * @param {Event} browserEvent The event. - * @param {Object} inPointer The in pointer. + * @param {TouchEvent} browserEvent The event. + * @param {PointerEvent} inPointer The in pointer. */ TouchSource.prototype.cancelOut_ = function(browserEvent, inPointer) { this.dispatcher.cancel(inPointer, browserEvent); @@ -409,7 +409,7 @@ TouchSource.prototype.cancelOut_ = function(browserEvent, inPointer) { /** * @private - * @param {Object} inPointer The inPointer object. + * @param {PointerEvent} inPointer The inPointer object. */ TouchSource.prototype.cleanUpPointer_ = function(inPointer) { delete this.pointerMap[inPointer.pointerId]; @@ -421,7 +421,7 @@ TouchSource.prototype.cleanUpPointer_ = function(inPointer) { * Prevent synth mouse events from creating pointer events. * * @private - * @param {Event} inEvent The in event. + * @param {TouchEvent} inEvent The in event. */ TouchSource.prototype.dedupSynthMouse_ = function(inEvent) { const lts = this.mouseSource.lastTouches; 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) {};