Compare commits

..

34 Commits

Author SHA1 Message Date
Andreas Hocevar
60600d3108 Merge pull request #8349 from ahocevar/release-v5.0.1
Release v5.0.1
2018-07-04 23:57:53 +02:00
Andreas Hocevar
1b9cad6b8d Merge pull request #8343 from tschaub/starter-project
Starter projects
2018-07-04 23:52:14 +02:00
Andreas Hocevar
c9b638f5fd Merge pull request #8347 from ahocevar/post-release-notes-fixes
Fix typos in release notes
2018-07-04 22:17:50 +02:00
ahocevar
f3b79c57f7 Fix typos in release notes 2018-07-04 22:17:18 +02:00
Andreas Hocevar
769a14d0dc Merge pull request #8346 from openlayers/release-v5.0.1
Release v5.0.1
2018-07-04 22:07:56 +02:00
Andreas Hocevar
e18d485d01 Merge pull request #8342 from ahocevar/quickstart-links
Fix links and description in quickstart tutorial
2018-07-04 19:20:33 +02:00
Tim Schaub
853fc77f2a Merge pull request #8344 from tschaub/issue-templates
Updated issue and pr templates
2018-07-04 10:43:50 -06:00
Tim Schaub
c678354aec Remove Rollup/Closure gist 2018-07-04 09:05:04 -06:00
Tim Schaub
1f06f7c2ac Updated issue and pr templates 2018-07-04 08:58:29 -06:00
Tim Schaub
9c085e37de Starter project with Parcel 2018-07-04 08:45:39 -06:00
Tim Schaub
a6896ed531 New starter projects 2018-07-04 08:32:15 -06:00
ahocevar
9304ee25af Fix links and description in quickstart tutorial 2018-07-04 14:52:14 +02:00
Andreas Hocevar
f0f21d583a Merge pull request #8338 from openlayers/greenkeeper/recast-0.15.1
Update recast to the latest version 🚀
2018-07-04 13:46:23 +02:00
Andreas Hocevar
54d50af2c3 Merge pull request #8341 from ahocevar/side-effects
Set sideEffects: false flag
2018-07-04 13:44:37 +02:00
ahocevar
9f84494b02 Set sideEffects: false flag 2018-07-04 13:10:20 +02:00
greenkeeper[bot]
e18a23c877 chore(package): update recast to version 0.15.1 2018-07-04 02:57:20 +00:00
Andreas Hocevar
cb78019825 Merge pull request #8332 from openlayers/greenkeeper/webpack-4.14.0
Update webpack to the latest version 🚀
2018-07-02 07:17:08 +02:00
Frédéric Junod
352d77e2ec Merge pull request #8333 from openlayers/cleanup
Fix wrong return type for readHref function
2018-07-01 07:31:56 +02:00
greenkeeper[bot]
a978467726 chore(package): update webpack to version 4.14.0 2018-06-29 13:18:58 +00:00
Frederic Junod
ddeb091871 Fix wrong return type for readHref function 2018-06-29 14:15:07 +02:00
Frédéric Junod
bc60c8ec32 Merge pull request #8329 from fredj/better_typing
Better jsdoc typing
2018-06-29 13:12:09 +02:00
Frederic Junod
6da2e4cef4 More precise Event typing 2018-06-29 12:53:20 +02:00
Andreas Hocevar
001add5a28 Merge pull request #8326 from openlayers/greenkeeper/webpack-4.13.0
Update webpack to the latest version 🚀
2018-06-29 11:05:46 +02:00
Frederic Junod
8c4c70e9f0 Change 'Element' type to 'HTMLElement' 2018-06-29 09:31:59 +02:00
Frederic Junod
0c300d651f Change 'Image' type to 'HTMLImageElement' 2018-06-29 09:31:32 +02:00
greenkeeper[bot]
b072dc5968 chore(package): update webpack to version 4.13.0 2018-06-28 16:39:52 +00:00
Frédéric Junod
52e286b03c Merge pull request #8319 from fredj/cleanup
Remove reference to setProj4 function in documentation
2018-06-27 11:20:15 +02:00
Andreas Hocevar
7dcc720029 Improve readability 2018-06-27 11:15:49 +02:00
Frederic Junod
770407f1ba Remove reference to setProj4 function in documentation
The function was removed in #7598
2018-06-27 10:35:03 +02:00
Andreas Hocevar
53cb47cab9 Merge pull request #8321 from openlayers/greenkeeper/rollup-0.62.0
Update rollup to the latest version 🚀
2018-06-27 10:26:02 +02:00
greenkeeper[bot]
5ba08b7291 chore(package): update rollup to version 0.62.0 2018-06-27 08:11:02 +00:00
Andreas Hocevar
43e67b73c2 Merge pull request #8318 from openlayers/greenkeeper/webpack-4.12.2
Update webpack to the latest version 🚀
2018-06-27 09:39:54 +02:00
greenkeeper[bot]
4ed9f27cd1 chore(package): update webpack to version 4.12.2 2018-06-27 06:41:38 +00:00
Andreas Hocevar
bde6caf082 Merge pull request #8317 from openlayers/release-v5.0.0
Release v5.0.0
2018-06-26 22:08:29 +02:00
33 changed files with 108 additions and 109 deletions

View File

@@ -1,8 +1,9 @@
<!--
Thank you for your interest in making OpenLayers better!
To keep this project manageable for maintainers, we ask you to please check all boxes below before submitting an issue.
If you are reporting a bug, please link to an example that reproduces the problem. This will make it easier for people who may want to help you debug.
- [ ] I am submitting a bug or feature request, not a usage question. Go to https://stackoverflow.com/questions/tagged/openlayers for questions.
- [ ] I have searched GitHub to see if a similar bug or feature request has already been reported.
- [ ] I have verified that the issue is present in the latest version of OpenLayers (see 'LATEST' on https://openlayers.org/).
- [ ] If reporting a bug, I have created a [CodePen](https://codepen.io) or prepared a stack trace (using the latest version and unminified code, so e.g. `ol-debug.js`, not `ol.js`) that shows the issue.
If you have a usage question, you might want to try Stack Overflow first: https://stackoverflow.com/questions/tagged/openlayers
Thanks
-->

View File

@@ -1,8 +1,13 @@
<!--
Thank you for your interest in making OpenLayers better!
In order to get your proposed changes merged into the master branch, we ask you to please make sure the following boxes are checked *before* submitting your pull request.
Before submitting a pull request, it is best to open an issue describing the bug you are fixing or the feature you are proposing to add.
- [ ] This pull request addresses an issue that has been marked with the 'Pull request accepted' label & I have added the link to that issue.
- [ ] It contains one or more small, incremental, logically separate commits, with no merge commits.
- [ ] I have used clear commit messages.
- [ ] Existing tests pass for me locally & I have added or updated tests for new or changed functionality.
Here are some other tips that make pull requests easier to review:
* Commits in the branch are small and logically separated (with no unnecessary merge commits).
* Commit messages are clear.
* Existing tests pass, new functionality is covered by new tests, and fixes have regression tests.
Thanks
-->

View File

@@ -1,7 +0,0 @@
# 5.0.2
The v5.0.1 release updates the package readme with new example projects.
## Fixes
* [#8332](https://github.com/openlayers/openlayers/pull/8343) - Starter projects ([@tschaub](https://github.com/tschaub))

View File

@@ -1,6 +1,6 @@
{
"name": "openlayers",
"version": "5.0.2",
"version": "5.0.1",
"description": "OpenLayers mapping library",
"keywords": [
"map",
@@ -75,8 +75,8 @@
"mustache": "^2.3.0",
"pixelmatch": "^4.0.2",
"proj4": "2.4.4",
"recast": "0.15.0",
"rollup": "0.61.2",
"recast": "0.15.1",
"rollup": "0.62.0",
"rollup-plugin-buble": "0.19.2",
"rollup-plugin-commonjs": "9.1.3",
"rollup-plugin-node-resolve": "3.3.0",
@@ -86,7 +86,7 @@
"uglifyjs-webpack-plugin": "^1.2.5",
"url-polyfill": "^1.0.13",
"walk": "^2.3.9",
"webpack": "4.12.1",
"webpack": "4.14.0",
"webpack-cli": "^3.0.3",
"webpack-dev-server": "^3.1.4"
},

View File

@@ -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;

View File

@@ -65,7 +65,7 @@ ImageBase.prototype.getExtent = function() {
/**
* @abstract
* @return {HTMLCanvasElement|Image|HTMLVideoElement} Image.
* @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.
*/
ImageBase.prototype.getImage = function() {};

View File

@@ -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) {

View File

@@ -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.<number>} [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

View File

@@ -76,7 +76,7 @@ import {create as createTransform, apply as applyTransform} from './transform.js
* @typedef {Object} MapOptionsInternal
* @property {module:ol/Collection.<module:ol/control/Control>} [controls]
* @property {module:ol/Collection.<module:ol/interaction/Interaction>} [interactions]
* @property {Element|Document} keyboardEventTarget
* @property {HTMLElement|Document} keyboardEventTarget
* @property {module:ol/Collection.<module:ol/Overlay>} overlays
* @property {Object.<string, *>} values
*/
@@ -93,7 +93,7 @@ import {create as createTransform, apply as applyTransform} from './transform.js
* @property {module:ol/Collection.<module:ol/interaction/Interaction>|Array.<module:ol/interaction/Interaction>} [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.<module:ol/Overlay>|Array.<module:ol/Overlay>} [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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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;

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -12,7 +12,7 @@ const NAMESPACE_URI = 'http://www.w3.org/1999/xlink';
/**
* @param {Node} node Node.
* @return {boolean|undefined} Boolean.
* @return {string|undefined} href.
*/
export function readHref(node) {
return node.getAttributeNS(NAMESPACE_URI, 'href');

View File

@@ -1,6 +1,6 @@
{
"name": "ol",
"version": "5.0.2",
"version": "5.0.1",
"description": "OpenLayers mapping library",
"main": "index.js",
"module": "index.js",

View File

@@ -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)) {

View File

@@ -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;

View File

@@ -45,9 +45,9 @@ import {METERS_PER_UNIT} from '../proj/Units.js';
* urn:ogc:def:crs:EPSG:6.18:3:3857,
* http://www.opengis.net/gml/srs/epsg.xml#3857
*
* If you use proj4js, aliases can be added using `proj4.defs()`; see
* [documentation](https://github.com/proj4js/proj4js). To set an alternative
* namespace for proj4, use {@link module:ol/proj~setProj4}.
* If you use [proj4js](https://github.com/proj4js/proj4js), aliases can
* be added using `proj4.defs()`. After all required projection definitions are
* added, call the {@link module:ol/proj/proj4~register} function.
*
* @constructor
* @param {module:ol/proj/Projection~Options} options Projection options.

View File

@@ -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;

View File

@@ -100,7 +100,7 @@ const CanvasImmediateRenderer = function(context, pixelRatio, extent, transform,
/**
* @private
* @type {HTMLCanvasElement|HTMLVideoElement|Image}
* @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement}
*/
this.image_ = null;

View File

@@ -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]);

View File

@@ -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() {};

View File

@@ -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.

View File

@@ -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;

View File

@@ -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.<number>} [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
*/

View File

@@ -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_) {

View File

@@ -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) {};

View File

@@ -52,4 +52,4 @@ export function getUid(obj) {
* OpenLayers version.
* @type {string}
*/
export const VERSION = '5.0.2';
export const VERSION = '5.0.1';