plotly.py icon indicating copy to clipboard operation
plotly.py copied to clipboard

fix: clean up resize listener when view gets removed

Open maartenbreddels opened this issue 2 years ago • 0 comments

Fixes #3100

If this is not cleaned up, we see a lot of stacktraces in the JS console:

index.js?v=20220623202309:2 Uncaught (in promise) Error: Resize must be passed a displayed plot div element. at index.js?v=20220623202309:2:2385247 at new Promise () at b.resize (index.js?v=20220623202309:2:2385199) at h.autosizeFigure (index.js?v=20220623202309:2:3736430) at index.js?v=20220623202309:2:3736222

Also, the destroy method is renamed to remove. Destroy will never be called, but remove is.

maartenbreddels avatar Jul 07 '22 10:07 maartenbreddels