Use extends and super for PluggableMap

This commit is contained in:
ahocevar
2018-07-17 14:09:23 +02:00
parent 0f6ee28c19
commit 505f88031b
+4 -7
View File
@@ -1,7 +1,7 @@
/** /**
* @module ol/PluggableMap * @module ol/PluggableMap
*/ */
import {getUid, inherits} from './util.js'; import {getUid} from './util.js';
import Collection from './Collection.js'; import Collection from './Collection.js';
import CollectionEventType from './CollectionEventType.js'; import CollectionEventType from './CollectionEventType.js';
import MapBrowserEvent from './MapBrowserEvent.js'; import MapBrowserEvent from './MapBrowserEvent.js';
@@ -131,21 +131,20 @@ import {create as createTransform, apply as applyTransform} from './transform.js
/** /**
* @extends {module:ol/Object}
* @fires module:ol/MapBrowserEvent~MapBrowserEvent * @fires module:ol/MapBrowserEvent~MapBrowserEvent
* @fires module:ol/MapEvent~MapEvent * @fires module:ol/MapEvent~MapEvent
* @fires module:ol/render/Event~RenderEvent#postcompose * @fires module:ol/render/Event~RenderEvent#postcompose
* @fires module:ol/render/Event~RenderEvent#precompose * @fires module:ol/render/Event~RenderEvent#precompose
* @api * @api
*/ */
class PluggableMap { class PluggableMap extends BaseObject {
/** /**
* @param {module:ol/PluggableMap~MapOptions} options Map options. * @param {module:ol/PluggableMap~MapOptions} options Map options.
*/ */
constructor(options) { constructor(options) {
BaseObject.call(this); super();
const optionsInternal = createOptionsInternal(options); const optionsInternal = createOptionsInternal(options);
@@ -537,7 +536,7 @@ class PluggableMap {
this.animationDelayKey_ = undefined; this.animationDelayKey_ = undefined;
} }
this.setTarget(null); this.setTarget(null);
BaseObject.prototype.disposeInternal.call(this); super.disposeInternal();
} }
/** /**
@@ -1339,8 +1338,6 @@ class PluggableMap {
} }
} }
inherits(PluggableMap, BaseObject);
/** /**
* @param {MapOptions} options Map options. * @param {MapOptions} options Map options.