Use extends and super for MapEvent

This commit is contained in:
ahocevar
2018-07-17 13:55:37 +02:00
parent 5a90203aa0
commit e1fedca22e

View File

@@ -1,17 +1,14 @@
/**
* @module ol/MapEvent
*/
import {inherits} from './util.js';
import Event from './events/Event.js';
/**
* @classdesc
* Events emitted as map events are instances of this type.
* See {@link module:ol/Map~Map} for which events trigger a map event.
*
* @extends {module:ol/events/Event}
*/
class MapEvent {
class MapEvent extends Event {
/**
* @param {string} type Event type.
@@ -20,7 +17,7 @@ class MapEvent {
*/
constructor(type, map, opt_frameState) {
Event.call(this, type);
super(type);
/**
* The map where the event occurred.
@@ -40,6 +37,4 @@ class MapEvent {
}
inherits(MapEvent, Event);
export default MapEvent;