From 505f88031b28a6fad810ebc1318046f1ed19fe02 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Tue, 17 Jul 2018 14:09:23 +0200 Subject: [PATCH] Use extends and super for PluggableMap --- src/ol/PluggableMap.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/ol/PluggableMap.js b/src/ol/PluggableMap.js index d6cbcef038..09f7a33e25 100644 --- a/src/ol/PluggableMap.js +++ b/src/ol/PluggableMap.js @@ -1,7 +1,7 @@ /** * @module ol/PluggableMap */ -import {getUid, inherits} from './util.js'; +import {getUid} from './util.js'; import Collection from './Collection.js'; import CollectionEventType from './CollectionEventType.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/MapEvent~MapEvent * @fires module:ol/render/Event~RenderEvent#postcompose * @fires module:ol/render/Event~RenderEvent#precompose * @api */ -class PluggableMap { +class PluggableMap extends BaseObject { /** * @param {module:ol/PluggableMap~MapOptions} options Map options. */ constructor(options) { - BaseObject.call(this); + super(); const optionsInternal = createOptionsInternal(options); @@ -537,7 +536,7 @@ class PluggableMap { this.animationDelayKey_ = undefined; } this.setTarget(null); - BaseObject.prototype.disposeInternal.call(this); + super.disposeInternal(); } /** @@ -1339,8 +1338,6 @@ class PluggableMap { } } -inherits(PluggableMap, BaseObject); - /** * @param {MapOptions} options Map options.