Set the canvas size to 0 on dispose

This commit is contained in:
Frederic Junod
2019-03-08 13:19:17 +01:00
parent a372ca0569
commit 6de566d95b
3 changed files with 11 additions and 0 deletions

View File

@@ -152,6 +152,7 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer {
*/
disposeInternal() {
unlisten(labelCache, EventType.CLEAR, this.handleFontsChanged_, this);
this.overlayContext_.canvas.width = this.overlayContext_.canvas.height = 0;
super.disposeInternal();
}