Fix types for events

This commit is contained in:
Andreas Hocevar
2020-05-10 18:00:04 +02:00
parent 33ce206bab
commit c6341bbcd9
4 changed files with 13 additions and 11 deletions

View File

@@ -7,25 +7,26 @@ import MapEvent from './MapEvent.js';
* @classdesc
* Events emitted as map browser events are instances of this type.
* See {@link module:ol/PluggableMap~PluggableMap} for which events trigger a map browser event.
* @template {UIEvent} EVENT
*/
class MapBrowserEvent extends MapEvent {
/**
* @param {string} type Event type.
* @param {import("./PluggableMap.js").default} map Map.
* @param {PointerEvent} browserEvent Browser event.
* @param {EVENT} originalEvent Original event.
* @param {boolean=} opt_dragging Is the map currently being dragged?
* @param {?import("./PluggableMap.js").FrameState=} opt_frameState Frame state.
*/
constructor(type, map, browserEvent, opt_dragging, opt_frameState) {
constructor(type, map, originalEvent, opt_dragging, opt_frameState) {
super(type, map, opt_frameState);
/**
* The original browser event.
* @const
* @type {PointerEvent}
* @type {EVENT}
* @api
*/
this.originalEvent = browserEvent;
this.originalEvent = originalEvent;
/**
* The map pixel relative to the viewport corresponding to the original browser event.
@@ -50,7 +51,7 @@ class MapBrowserEvent extends MapEvent {
}
/**
* The map pixel relative to the viewport corresponding to the original browser event.
* The map pixel relative to the viewport corresponding to the original event.
* @type {import("./pixel.js").Pixel}
* @api
*/