Use extends and super for VectorImageTile
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @module ol/VectorImageTile
|
* @module ol/VectorImageTile
|
||||||
*/
|
*/
|
||||||
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';
|
||||||
import {createCanvasContext2D} from './dom.js';
|
import {createCanvasContext2D} from './dom.js';
|
||||||
@@ -21,10 +21,7 @@ import {UNDEFINED} from './functions.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
class VectorImageTile extends Tile {
|
||||||
* @extends {module:ol/Tile}
|
|
||||||
*/
|
|
||||||
class VectorImageTile {
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
|
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
|
||||||
@@ -46,25 +43,11 @@ class VectorImageTile {
|
|||||||
* Function to call when a source tile's state changes.
|
* Function to call when a source tile's state changes.
|
||||||
* @param {number} zoom Integer zoom to render the tile for.
|
* @param {number} zoom Integer zoom to render the tile for.
|
||||||
*/
|
*/
|
||||||
constructor(
|
constructor(tileCoord, state, sourceRevision, format, tileLoadFunction,
|
||||||
tileCoord,
|
urlTileCoord, tileUrlFunction, sourceTileGrid, tileGrid, sourceTiles,
|
||||||
state,
|
pixelRatio, projection, tileClass, handleTileChange, zoom) {
|
||||||
sourceRevision,
|
|
||||||
format,
|
|
||||||
tileLoadFunction,
|
|
||||||
urlTileCoord,
|
|
||||||
tileUrlFunction,
|
|
||||||
sourceTileGrid,
|
|
||||||
tileGrid,
|
|
||||||
sourceTiles,
|
|
||||||
pixelRatio,
|
|
||||||
projection,
|
|
||||||
tileClass,
|
|
||||||
handleTileChange,
|
|
||||||
zoom
|
|
||||||
) {
|
|
||||||
|
|
||||||
Tile.call(this, tileCoord, state, {transition: 0});
|
super(tileCoord, state, {transition: 0});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -201,7 +184,7 @@ class VectorImageTile {
|
|||||||
this.loadListenerKeys_.length = 0;
|
this.loadListenerKeys_.length = 0;
|
||||||
this.sourceTileListenerKeys_.forEach(unlistenByKey);
|
this.sourceTileListenerKeys_.forEach(unlistenByKey);
|
||||||
this.sourceTileListenerKeys_.length = 0;
|
this.sourceTileListenerKeys_.length = 0;
|
||||||
Tile.prototype.disposeInternal.call(this);
|
super.disposeInternal();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -331,8 +314,6 @@ class VectorImageTile {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(VectorImageTile, Tile);
|
|
||||||
|
|
||||||
|
|
||||||
export default VectorImageTile;
|
export default VectorImageTile;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user