Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/components/graph/GraphCanvas.vue
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ import { useCommandStore } from '@/stores/commandStore'
import { useExecutionStore } from '@/stores/executionStore'
import { useExecutionErrorStore } from '@/stores/executionErrorStore'
import { useNodeDefStore } from '@/stores/nodeDefStore'
import { useBottomPanelStore } from '@/stores/workspace/bottomPanelStore'
import { useColorPaletteStore } from '@/stores/workspace/colorPaletteStore'
import { useSearchBoxStore } from '@/stores/workspace/searchBoxStore'
import { useAppMode } from '@/composables/useAppMode'
Expand Down Expand Up @@ -297,6 +298,25 @@ watch(
}
)

const { bottomPanelVisible } = storeToRefs(useBottomPanelStore())
// 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
// slot connectors even if any RO callback was missed or measured stale
// viewport state during the transition.
if (!canvasStore.canvas) return
requestSlotLayoutSyncForAllNodes()
canvasStore.canvas.setDirty(true, true)
})

function onLinkOverlayReady(el: HTMLCanvasElement) {
if (!canvasStore.canvas) return
canvasStore.canvas.overlayCanvas = el
Expand Down
Loading