gcode-preview
gcode-preview copied to clipboard
Add way to cleanup liilGui and stats.js
When creating a new instance of GCodePreview to replace the old, like when showing a different file, some (DOM) state should be cleaned up. Currently, stats.js and lilGui don't have have a proper way of disposing. (in the new vue demo there are some hacks for this)
Even when we're not creating a new instance, like when the user navigates away in a SPA, the whole GCodePreview, including lilGui and stats needs to be disposed.
We are refining the init/dispose cycle in 3.0 so to avoid rework let's move this to 3.0