Use extends and super for format/MVT

This commit is contained in:
ahocevar
2018-07-17 17:00:43 +02:00
parent a8bd0c5dd7
commit cf15af43e3
+2 -7
View File
@@ -3,7 +3,6 @@
*/ */
//FIXME Implement projection handling //FIXME Implement projection handling
import {inherits} from '../util.js';
import {assert} from '../asserts.js'; import {assert} from '../asserts.js';
import PBF from 'pbf'; import PBF from 'pbf';
import FeatureFormat, {transformWithOptions} from '../format/Feature.js'; import FeatureFormat, {transformWithOptions} from '../format/Feature.js';
@@ -42,18 +41,16 @@ import RenderFeature from '../render/Feature.js';
* @classdesc * @classdesc
* Feature format for reading data in the Mapbox MVT format. * Feature format for reading data in the Mapbox MVT format.
* *
* @extends {module:ol/format/Feature}
* @param {module:ol/format/MVT~Options=} opt_options Options. * @param {module:ol/format/MVT~Options=} opt_options Options.
* @api * @api
*/ */
class MVT { class MVT extends FeatureFormat {
/** /**
* @param {module:ol/format/MVT~Options=} opt_options Options. * @param {module:ol/format/MVT~Options=} opt_options Options.
*/ */
constructor(opt_options) { constructor(opt_options) {
super();
FeatureFormat.call(this);
const options = opt_options ? opt_options : {}; const options = opt_options ? opt_options : {};
@@ -321,8 +318,6 @@ class MVT {
writeFeatures() {} writeFeatures() {}
} }
inherits(MVT, FeatureFormat);
/** /**
* Reader callback for parsing layers. * Reader callback for parsing layers.