From ec495bfcec4eac2f9013b4b842df5bec2dcc4200 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Tue, 17 Jul 2018 11:56:21 +0200 Subject: [PATCH] Use extends and super for Geolocation --- src/ol/Geolocation.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/ol/Geolocation.js b/src/ol/Geolocation.js index 8ef22b3882..771479504a 100644 --- a/src/ol/Geolocation.js +++ b/src/ol/Geolocation.js @@ -1,7 +1,6 @@ /** * @module ol/Geolocation */ -import {inherits} from './util.js'; import GeolocationProperty from './GeolocationProperty.js'; import BaseObject, {getChangeEventType} from './Object.js'; import {listen} from './events.js'; @@ -44,10 +43,9 @@ import {get as getProjection, getTransformFromProjections, identityTransform} fr * }); * * @fires error - * @extends {module:ol/Object} * @api */ -class Geolocation { +class Geolocation extends BaseObject { /** * @param {module:ol/Geolocation~Options=} opt_options Options. @@ -100,7 +98,7 @@ class Geolocation { */ disposeInternal() { this.setTracking(false); - BaseObject.prototype.disposeInternal.call(this); + super.disposeInternal(); } /** @@ -333,7 +331,5 @@ class Geolocation { } } -inherits(Geolocation, BaseObject); - export default Geolocation;