fix: watch composite bottom-panel rendered condition incl. focusMode

Address review: bottomPanelVisible alone misses the focusMode case
(splitter hides the panel when focusMode is on, regardless of the
store flag). Compose the same condition the splitter uses so toggling
focusMode while the panel is open also triggers the redraw/resync.
This commit is contained in:
Glary-Bot
2026-05-15 21:28:19 +00:00
parent bb3731bcd9
commit 9529182117

View File

@@ -299,7 +299,14 @@ watch(
)
const { bottomPanelVisible } = storeToRefs(useBottomPanelStore())
watch(bottomPanelVisible, () => {
// Mirror the splitter's rendered condition: the bottom panel is hidden when
// focusMode is on, regardless of bottomPanelVisible (see
// LiteGraphCanvasSplitterOverlay.vue). Watching the composite means entering
// or leaving focus mode while the panel is open also triggers the redraw.
const bottomPanelRendered = computed(
() => bottomPanelVisible.value && !workspaceStore.focusMode
)
watch(bottomPanelRendered, () => {
// The splitter resizes the canvas container, which triggers the canvas
// ResizeObserver and (eventually) the per-node Vue ResizeObservers. Force a
// slot/link redraw once the splitter has settled so links stay aligned with