Fix sidebar splitter state (#1523)

This commit is contained in:
Chenlei Hu
2024-11-12 23:12:56 -05:00
committed by GitHub
parent d6e0c197bd
commit a73fdcd3bd

View File

@@ -1,7 +1,10 @@
<template>
<teleport to=".graph-canvas-container">
<!-- Load splitter overlay only after comfyApp is ready. -->
<!-- If load immediately, the top-level splitter stateKey won't be correctly
synced with the stateStorage (localStorage). -->
<LiteGraphCanvasSplitterOverlay
v-if="betaMenuEnabled && !workspaceStore.focusMode"
v-if="comfyAppReady && betaMenuEnabled && !workspaceStore.focusMode"
>
<template #side-bar-panel>
<SideToolbar />
@@ -237,6 +240,7 @@ usePragmaticDroppable(() => canvasRef.value, {
}
})
const comfyAppReady = ref(false)
onMounted(async () => {
// Backward compatible
// Assign all properties of lg to window
@@ -263,6 +267,7 @@ onMounted(async () => {
window['app'] = comfyApp
window['graph'] = comfyApp.graph
comfyAppReady.value = true
emit('ready')
})
</script>