Use extends and super for ImageTile

This commit is contained in:
ahocevar
2018-07-17 13:47:13 +02:00
parent 6ca865375e
commit 5f40b5b66b
+3 -9
View File
@@ -1,7 +1,6 @@
/** /**
* @module ol/ImageTile * @module ol/ImageTile
*/ */
import {inherits} 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';
@@ -14,10 +13,7 @@ import EventType from './events/EventType.js';
* @api * @api
*/ */
/** class ImageTile extends Tile {
* @extends {module:ol/Tile}
*/
class ImageTile {
/** /**
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate. * @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
@@ -29,7 +25,7 @@ class ImageTile {
*/ */
constructor(tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options) { constructor(tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options) {
Tile.call(this, tileCoord, state, opt_options); super(tileCoord, state, opt_options);
/** /**
* @private * @private
@@ -81,7 +77,7 @@ class ImageTile {
} }
this.state = TileState.ABORT; this.state = TileState.ABORT;
this.changed(); this.changed();
Tile.prototype.disposeInternal.call(this); super.disposeInternal();
} }
/** /**
@@ -163,8 +159,6 @@ class ImageTile {
} }
} }
inherits(ImageTile, Tile);
/** /**
* Get a 1-pixel blank image. * Get a 1-pixel blank image.