Use extends and super for Overlay

This commit is contained in:
ahocevar
2018-07-17 14:07:53 +02:00
parent 2fd022d215
commit 0f6ee28c19

View File

@@ -1,7 +1,6 @@
/** /**
* @module ol/Overlay * @module ol/Overlay
*/ */
import {inherits} from './util.js';
import MapEventType from './MapEventType.js'; import MapEventType from './MapEventType.js';
import BaseObject, {getChangeEventType} from './Object.js'; import BaseObject, {getChangeEventType} from './Object.js';
import OverlayPositioning from './OverlayPositioning.js'; import OverlayPositioning from './OverlayPositioning.js';
@@ -93,17 +92,16 @@ const Property = {
* popup.setPosition(coordinate); * popup.setPosition(coordinate);
* map.addOverlay(popup); * map.addOverlay(popup);
* *
* @extends {module:ol/Object}
* @api * @api
*/ */
class Overlay { class Overlay extends BaseObject {
/** /**
* @param {module:ol/Overlay~Options} options Overlay options. * @param {module:ol/Overlay~Options} options Overlay options.
*/ */
constructor(options) { constructor(options) {
BaseObject.call(this); super();
/** /**
* @protected * @protected
@@ -583,7 +581,5 @@ class Overlay {
} }
} }
inherits(Overlay, BaseObject);
export default Overlay; export default Overlay;