fix: Error when a zoomable element is removed during zoom initialization (#2624)

- Closes: #2410
This commit is contained in:
Dermot Duffy
2026-07-26 20:54:07 -07:00
committed by GitHub
parent ad89aa9538
commit 231e3087b7
4 changed files with 12 additions and 7 deletions
+3 -1
View File
@@ -18,7 +18,7 @@ import {
export class ZoomController {
private _element: HTMLElement;
private _panzoom?: PanzoomObject;
private _panzoom: PanzoomObject | null = null;
// Is the controller zoomed in at all?
private _zoomed = false;
@@ -184,6 +184,8 @@ export class ZoomController {
this._resizeObserver.disconnect();
this._element.removeEventListener('panzoomchange', this._debouncedChangeHandler);
this._panzoom = null;
}
public setDefaultSettings(config: PartialZoomSettings | null): void {