Use super.method instead of prototype.method.call

This commit is contained in:
Frederic Junod
2018-10-19 16:38:47 +02:00
parent 0787aa3439
commit d294b87358

View File

@@ -197,7 +197,7 @@ class TileImage extends UrlTile {
*/ */
getTileGridForProjection(projection) { getTileGridForProjection(projection) {
if (!ENABLE_RASTER_REPROJECTION) { if (!ENABLE_RASTER_REPROJECTION) {
return UrlTile.prototype.getTileGridForProjection.call(this, projection); return super.getTileGridForProjection(projection);
} }
const thisProj = this.getProjection(); const thisProj = this.getProjection();
if (this.tileGrid && (!thisProj || equivalent(thisProj, projection))) { if (this.tileGrid && (!thisProj || equivalent(thisProj, projection))) {
@@ -218,7 +218,7 @@ class TileImage extends UrlTile {
*/ */
getTileCacheForProjection(projection) { getTileCacheForProjection(projection) {
if (!ENABLE_RASTER_REPROJECTION) { if (!ENABLE_RASTER_REPROJECTION) {
return UrlTile.prototype.getTileCacheForProjection.call(this, projection); return super.getTileCacheForProjection(projection);
} }
const thisProj = this.getProjection(); if (!thisProj || equivalent(thisProj, projection)) { const thisProj = this.getProjection(); if (!thisProj || equivalent(thisProj, projection)) {
return this.tileCache; return this.tileCache;