Use extends and super for Overlay
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user