Use extends and super for Geolocation

This commit is contained in:
ahocevar
2018-07-17 11:56:21 +02:00
parent 6f4d2e34a9
commit ec495bfcec

View File

@@ -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;