diff --git a/assets/js/app.ts b/assets/js/app.ts index dcce2f82..735cac55 100644 --- a/assets/js/app.ts +++ b/assets/js/app.ts @@ -588,6 +588,11 @@ const NetworkMap = { destroyed(this: any) { if (this.cy) { + // Stop any running layout before destroying to prevent async callbacks + // from accessing a destroyed renderer + try { + this.cy.stop() + } catch (_e) { /* ignore */ } this.cy.destroy() this.cy = null } @@ -803,7 +808,7 @@ const NetworkMap = { }, minZoom: 0.2, maxZoom: 3, - wheelSensitivity: 0.2 + wheelSensitivity: 1 }) // Add click handler for nodes