From 3238ad3d32b4c88a9d68f4690f41747740b39bd1 Mon Sep 17 00:00:00 2001 From: Terry Jia Date: Sun, 8 Feb 2026 22:51:57 -0500 Subject: [PATCH] fix: re-mount DOM widget elements after leaving Linear mode (#8753) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary LinearView renders its own WidgetDOM instances which steal the widget.element via replaceChildren. When LinearView unmounts (v-if="linearMode") the element is removed from the DOM entirely. The canvas-side WidgetDOM stays mounted but its container is now empty, so DOM widgets (e.g. Three.js scenes) disappear. Watch canvasStore.linearMode and reclaim the element when switching back from Linear to Canvas mode. ## Screenshots (if applicable) before https://github.com/user-attachments/assets/78cea2bc-c4b3-4b21-bdb3-a521bb0d3062 after https://github.com/user-attachments/assets/8f92c44d-9514-4001-bbdb-bc4c80468ed7 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8753-fix-re-mount-DOM-widget-elements-after-leaving-Linear-mode-3026d73d3650810b8968eff13dc84e9a) by [Unito](https://www.unito.io) --- src/components/graph/widgets/DomWidget.vue | 4 +++- .../vueNodes/widgets/components/WidgetDOM.vue | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/components/graph/widgets/DomWidget.vue b/src/components/graph/widgets/DomWidget.vue index f20aac370..e4e5d50b6 100644 --- a/src/components/graph/widgets/DomWidget.vue +++ b/src/components/graph/widgets/DomWidget.vue @@ -18,7 +18,7 @@