fix: Do not activate pan & zoom on a detached element (#2640)
- Closes: #2633
This commit is contained in:
@@ -111,6 +111,12 @@ export class ZoomController {
|
||||
}
|
||||
|
||||
public activate(): void {
|
||||
// Panzoom throws if it is constructed against an element that is not
|
||||
// attached to the DOM.
|
||||
if (!this._element.isConnected) {
|
||||
return;
|
||||
}
|
||||
|
||||
const config = this._getConfigToUse();
|
||||
const converted = this._convertPercentToXYPan(
|
||||
config?.pan?.x ?? ZOOM_DEFAULT_PAN_X,
|
||||
|
||||
Reference in New Issue
Block a user