Use extends and super for geom

This commit is contained in:
Frederic Junod
2018-07-17 16:18:30 +02:00
parent 44bea898b8
commit c707b4c746
11 changed files with 204 additions and 238 deletions

View File

@@ -1,7 +1,6 @@
/**
* @module ol/geom/GeometryCollection
*/
import {inherits} from '../util.js';
import {listen, unlisten} from '../events.js';
import EventType from '../events/EventType.js';
import {createOrUpdateEmpty, closestSquaredDistanceXY, extend, getCenter} from '../extent.js';
@@ -13,15 +12,16 @@ import {clear} from '../obj.js';
* @classdesc
* An array of {@link module:ol/geom/Geometry} objects.
*
* @constructor
* @extends {module:ol/geom/Geometry}
* @param {Array.<module:ol/geom/Geometry>=} opt_geometries Geometries.
* @api
*/
class GeometryCollection {
class GeometryCollection extends Geometry {
/**
* @param {Array.<module:ol/geom/Geometry>=} opt_geometries Geometries.
*/
constructor(opt_geometries) {
Geometry.call(this);
super();
/**
* @private
@@ -281,8 +281,6 @@ class GeometryCollection {
}
}
inherits(GeometryCollection, Geometry);
/**
* @param {Array.<module:ol/geom/Geometry>} geometries Geometries.