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/SimpleGeometry
*/
import {inherits} from '../util.js';
import {FALSE} from '../functions.js';
import {createOrUpdateFromFlatCoordinates, getCenter} from '../extent.js';
import Geometry from '../geom/Geometry.js';
@@ -14,15 +13,13 @@ import {clear} from '../obj.js';
* Abstract base class; only used for creating subclasses; do not instantiate
* in apps, as cannot be rendered.
*
* @constructor
* @abstract
* @extends {module:ol/geom/Geometry}
* @api
*/
class SimpleGeometry {
class SimpleGeometry extends Geometry {
constructor() {
Geometry.call(this);
super();
/**
* @protected
@@ -257,8 +254,6 @@ class SimpleGeometry {
}
}
inherits(SimpleGeometry, Geometry);
/**
* @param {number} stride Stride.