From 0bd921772b2100988b0b671f705c2a7ed1cab8d2 Mon Sep 17 00:00:00 2001 From: charlieforward9 Date: Fri, 13 Dec 2024 01:19:44 -0500 Subject: [PATCH] fix: zoom rerendering Co-authored-by: YannNeobards --- src/canvas-overlay.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/canvas-overlay.ts b/src/canvas-overlay.ts index 4035f16..64d8df2 100644 --- a/src/canvas-overlay.ts +++ b/src/canvas-overlay.ts @@ -106,6 +106,7 @@ export class CanvasOverlay extends Layer { } pane.appendChild(this.canvas); + map.on("zoom", this._reset, this); map.on("moveend", this._reset, this); map.on("resize", this._resize, this); @@ -130,6 +131,7 @@ export class CanvasOverlay extends Layer { pane.removeChild(this.canvas); } + map.off("zoom", this._reset, this); map.off("moveend", this._reset, this); map.off("resize", this._resize, this);