Use extends and super for VectorTile
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @module ol/VectorTile
|
* @module ol/VectorTile
|
||||||
*/
|
*/
|
||||||
import {getUid, inherits} from './util.js';
|
import {getUid} from './util.js';
|
||||||
import Tile from './Tile.js';
|
import Tile from './Tile.js';
|
||||||
import TileState from './TileState.js';
|
import TileState from './TileState.js';
|
||||||
|
|
||||||
@@ -18,10 +18,7 @@ const DEFAULT_EXTENT = [0, 0, 4096, 4096];
|
|||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
class VectorTile extends Tile {
|
||||||
* @extends {module:ol/Tile}
|
|
||||||
*/
|
|
||||||
class VectorTile {
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
|
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
|
||||||
@@ -33,7 +30,7 @@ class VectorTile {
|
|||||||
*/
|
*/
|
||||||
constructor(tileCoord, state, src, format, tileLoadFunction, opt_options) {
|
constructor(tileCoord, state, src, format, tileLoadFunction, opt_options) {
|
||||||
|
|
||||||
Tile.call(this, tileCoord, state, opt_options);
|
super(tileCoord, state, opt_options);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {number}
|
* @type {number}
|
||||||
@@ -99,7 +96,7 @@ class VectorTile {
|
|||||||
this.replayGroups_ = {};
|
this.replayGroups_ = {};
|
||||||
this.state = TileState.ABORT;
|
this.state = TileState.ABORT;
|
||||||
this.changed();
|
this.changed();
|
||||||
Tile.prototype.disposeInternal.call(this);
|
super.disposeInternal();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -243,6 +240,4 @@ class VectorTile {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(VectorTile, Tile);
|
|
||||||
|
|
||||||
export default VectorTile;
|
export default VectorTile;
|
||||||
|
|||||||
Reference in New Issue
Block a user