From 5f40b5b66b6e7c3875e9e383a00fbee11b007301 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Tue, 17 Jul 2018 13:47:13 +0200 Subject: [PATCH] Use extends and super for ImageTile --- src/ol/ImageTile.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/ol/ImageTile.js b/src/ol/ImageTile.js index c6613bd5a1..5de7a12eae 100644 --- a/src/ol/ImageTile.js +++ b/src/ol/ImageTile.js @@ -1,7 +1,6 @@ /** * @module ol/ImageTile */ -import {inherits} from './util.js'; import Tile from './Tile.js'; import TileState from './TileState.js'; import {createCanvasContext2D} from './dom.js'; @@ -14,10 +13,7 @@ import EventType from './events/EventType.js'; * @api */ -/** - * @extends {module:ol/Tile} - */ -class ImageTile { +class ImageTile extends Tile { /** * @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate. @@ -29,7 +25,7 @@ class ImageTile { */ constructor(tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options) { - Tile.call(this, tileCoord, state, opt_options); + super(tileCoord, state, opt_options); /** * @private @@ -81,7 +77,7 @@ class ImageTile { } this.state = TileState.ABORT; this.changed(); - Tile.prototype.disposeInternal.call(this); + super.disposeInternal(); } /** @@ -163,8 +159,6 @@ class ImageTile { } } -inherits(ImageTile, Tile); - /** * Get a 1-pixel blank image.