From 9c994138ad46fe77d862644c1695d86709434276 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Tue, 17 Jul 2018 14:19:43 +0200 Subject: [PATCH] Use extends and super for VectorTile --- src/ol/VectorTile.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/ol/VectorTile.js b/src/ol/VectorTile.js index 5341573e84..545228da8e 100644 --- a/src/ol/VectorTile.js +++ b/src/ol/VectorTile.js @@ -1,7 +1,7 @@ /** * @module ol/VectorTile */ -import {getUid, inherits} from './util.js'; +import {getUid} from './util.js'; import Tile from './Tile.js'; import TileState from './TileState.js'; @@ -18,10 +18,7 @@ const DEFAULT_EXTENT = [0, 0, 4096, 4096]; * @api */ -/** - * @extends {module:ol/Tile} - */ -class VectorTile { +class VectorTile extends Tile { /** * @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate. @@ -33,7 +30,7 @@ class VectorTile { */ constructor(tileCoord, state, src, format, tileLoadFunction, opt_options) { - Tile.call(this, tileCoord, state, opt_options); + super(tileCoord, state, opt_options); /** * @type {number} @@ -99,7 +96,7 @@ class VectorTile { this.replayGroups_ = {}; this.state = TileState.ABORT; this.changed(); - Tile.prototype.disposeInternal.call(this); + super.disposeInternal(); } /** @@ -243,6 +240,4 @@ class VectorTile { } } -inherits(VectorTile, Tile); - export default VectorTile;