Use super.method instead of prototype.method.call
This commit is contained in:
@@ -274,7 +274,7 @@ class GeometryCollection extends Geometry {
|
||||
*/
|
||||
disposeInternal() {
|
||||
this.unlistenGeometriesChange_();
|
||||
Geometry.prototype.disposeInternal.call(this);
|
||||
super.disposeInternal();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -411,7 +411,7 @@ class PointerEventHandler extends EventTarget {
|
||||
*/
|
||||
disposeInternal() {
|
||||
this.unregister_();
|
||||
EventTarget.prototype.disposeInternal.call(this);
|
||||
super.disposeInternal();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ class CanvasLineStringReplay extends CanvasReplay {
|
||||
state.lastStroke = this.coordinates.length;
|
||||
}
|
||||
state.lastStroke = 0;
|
||||
CanvasReplay.prototype.applyStroke.call(this, state);
|
||||
super.applyStroke(state);
|
||||
this.instructions.push(beginPathInstruction);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ class WebGLImageReplay extends WebGLTextureReplay {
|
||||
|
||||
this.images_ = null;
|
||||
this.hitDetectionImages_ = null;
|
||||
WebGLTextureReplay.prototype.finish.call(this, context);
|
||||
super.finish(context);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -338,7 +338,7 @@ class WebGLTextReplay extends WebGLTextureReplay {
|
||||
this.images_ = null;
|
||||
this.atlases_ = {};
|
||||
this.currAtlas_ = undefined;
|
||||
WebGLTextureReplay.prototype.finish.call(this, context);
|
||||
super.finish(context);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -69,7 +69,7 @@ class CanvasImageLayerRenderer extends IntermediateCanvasRenderer {
|
||||
if (this.vectorRenderer_) {
|
||||
this.vectorRenderer_.dispose();
|
||||
}
|
||||
IntermediateCanvasRenderer.prototype.disposeInternal.call(this);
|
||||
super.disposeInternal();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -184,7 +184,7 @@ class CanvasImageLayerRenderer extends IntermediateCanvasRenderer {
|
||||
if (this.vectorRenderer_) {
|
||||
return this.vectorRenderer_.forEachFeatureAtCoordinate(coordinate, frameState, hitTolerance, callback, thisArg);
|
||||
} else {
|
||||
return IntermediateCanvasRenderer.prototype.forEachFeatureAtCoordinate.call(this, coordinate, frameState, hitTolerance, callback, thisArg);
|
||||
return super.forEachFeatureAtCoordinate(coordinate, frameState, hitTolerance, callback, thisArg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ class IntermediateCanvasRenderer extends CanvasLayerRenderer {
|
||||
if (this.getLayer().getSource().forEachFeatureAtCoordinate !== VOID) {
|
||||
// for ImageCanvas sources use the original hit-detection logic,
|
||||
// so that for example also transparent polygons are detected
|
||||
return CanvasLayerRenderer.prototype.forEachLayerAtCoordinate.apply(this, arguments);
|
||||
return super.forEachLayerAtCoordinate(arguments);
|
||||
} else {
|
||||
const pixel = applyTransform(this.coordinateToCanvasPixelTransform, coordinate.slice());
|
||||
scaleCoordinate(pixel, frameState.viewState.resolution / this.renderedResolution);
|
||||
|
||||
@@ -209,7 +209,7 @@ class CanvasMapRenderer extends MapRenderer {
|
||||
* @inheritDoc
|
||||
*/
|
||||
registerLayerRenderers(constructors) {
|
||||
MapRenderer.prototype.registerLayerRenderers.call(this, constructors);
|
||||
super.registerLayerRenderers(constructors);
|
||||
for (let i = 0, ii = constructors.length; i < ii; ++i) {
|
||||
const ctor = constructors[i];
|
||||
if (!includes(layerRendererConstructors, ctor)) {
|
||||
|
||||
@@ -91,7 +91,7 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer {
|
||||
*/
|
||||
disposeInternal() {
|
||||
unlisten(labelCache, EventType.CLEAR, this.handleFontsChanged_, this);
|
||||
CanvasLayerRenderer.prototype.disposeInternal.call(this);
|
||||
super.disposeInternal();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -97,14 +97,14 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer {
|
||||
*/
|
||||
disposeInternal() {
|
||||
unlisten(labelCache, EventType.CLEAR, this.handleFontsChanged_, this);
|
||||
CanvasTileLayerRenderer.prototype.disposeInternal.call(this);
|
||||
super.disposeInternal();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
getTile(z, x, y, pixelRatio, projection) {
|
||||
const tile = CanvasTileLayerRenderer.prototype.getTile.call(this, z, x, y, pixelRatio, projection);
|
||||
const tile = super.getTile(z, x, y, pixelRatio, projection);
|
||||
if (tile.getState() === TileState.LOADED) {
|
||||
this.createReplayGroup_(tile, pixelRatio, projection);
|
||||
if (this.context) {
|
||||
@@ -131,7 +131,7 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer {
|
||||
}
|
||||
}
|
||||
this.renderedLayerRevision_ = layerRevision;
|
||||
return CanvasTileLayerRenderer.prototype.prepareFrame.apply(this, arguments);
|
||||
return super.prepareFrame(frameState, layerState);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -404,7 +404,7 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer {
|
||||
/** @type {number} */ (offsetX), /** @type {number} */ (offsetY));
|
||||
}
|
||||
}
|
||||
CanvasTileLayerRenderer.prototype.postCompose.apply(this, arguments);
|
||||
super.postCompose(context, frameState, layerState);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -291,7 +291,7 @@ class WebGLMapRenderer extends MapRenderer {
|
||||
});
|
||||
}
|
||||
this.context_.dispose();
|
||||
MapRenderer.prototype.disposeInternal.call(this);
|
||||
super.disposeInternal();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -100,7 +100,7 @@ class WebGLTileLayerRenderer extends WebGLLayerRenderer {
|
||||
disposeInternal() {
|
||||
const context = this.mapRenderer.getContext();
|
||||
context.deleteBuffer(this.renderArrayBuffer_);
|
||||
WebGLLayerRenderer.prototype.disposeInternal.call(this);
|
||||
super.disposeInternal();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -135,7 +135,7 @@ class WebGLTileLayerRenderer extends WebGLLayerRenderer {
|
||||
* @inheritDoc
|
||||
*/
|
||||
handleWebGLContextLost() {
|
||||
WebGLLayerRenderer.prototype.handleWebGLContextLost.call(this);
|
||||
super.handleWebGLContextLost();
|
||||
this.locations_ = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ class WebGLVectorLayerRenderer extends WebGLLayerRenderer {
|
||||
replayGroup.getDeleteResourcesFunction(context)();
|
||||
this.replayGroup_ = null;
|
||||
}
|
||||
WebGLLayerRenderer.prototype.disposeInternal.call(this);
|
||||
super.disposeInternal();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -121,7 +121,7 @@ class ReprojImage extends ImageBase {
|
||||
if (this.state == ImageState.LOADING) {
|
||||
this.unlistenSource_();
|
||||
}
|
||||
ImageBase.prototype.disposeInternal.call(this);
|
||||
super.disposeInternal();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -210,7 +210,7 @@ class ReprojTile extends Tile {
|
||||
if (this.state == TileState.LOADING) {
|
||||
this.unlistenSources_();
|
||||
}
|
||||
Tile.prototype.disposeInternal.call(this);
|
||||
super.disposeInternal();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -143,7 +143,7 @@ class Cluster extends VectorSource {
|
||||
this.clear();
|
||||
this.cluster();
|
||||
this.addFeatures(this.features);
|
||||
VectorSource.prototype.refresh.call(this);
|
||||
super.refresh();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -132,7 +132,7 @@ class Static extends ImageSource {
|
||||
this.image_.setImage(canvas);
|
||||
}
|
||||
}
|
||||
ImageSource.prototype.handleImageChange.call(this, evt);
|
||||
super.handleImageChange(evt);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ class TileImage extends UrlTile {
|
||||
*/
|
||||
canExpireCache() {
|
||||
if (!ENABLE_RASTER_REPROJECTION) {
|
||||
return UrlTile.prototype.canExpireCache.call(this);
|
||||
return super.canExpireCache();
|
||||
}
|
||||
if (this.tileCache.canExpireCache()) {
|
||||
return true;
|
||||
@@ -149,7 +149,7 @@ class TileImage extends UrlTile {
|
||||
*/
|
||||
expireCache(projection, usedTiles) {
|
||||
if (!ENABLE_RASTER_REPROJECTION) {
|
||||
UrlTile.prototype.expireCache.call(this, projection, usedTiles);
|
||||
super.expireCache(projection, usedTiles);
|
||||
return;
|
||||
}
|
||||
const usedTileCache = this.getTileCacheForProjection(projection);
|
||||
@@ -188,7 +188,7 @@ class TileImage extends UrlTile {
|
||||
this.getProjection() && projection && !equivalent(this.getProjection(), projection)) {
|
||||
return false;
|
||||
} else {
|
||||
return UrlTile.prototype.getOpaque.call(this, projection);
|
||||
return super.getOpaque(projection);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user