mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-28 02:02:08 +00:00
Fix sidebar splitter state (#1523)
This commit is contained in:
@@ -1,7 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<teleport to=".graph-canvas-container">
|
<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
|
<LiteGraphCanvasSplitterOverlay
|
||||||
v-if="betaMenuEnabled && !workspaceStore.focusMode"
|
v-if="comfyAppReady && betaMenuEnabled && !workspaceStore.focusMode"
|
||||||
>
|
>
|
||||||
<template #side-bar-panel>
|
<template #side-bar-panel>
|
||||||
<SideToolbar />
|
<SideToolbar />
|
||||||
@@ -237,6 +240,7 @@ usePragmaticDroppable(() => canvasRef.value, {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const comfyAppReady = ref(false)
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
// Backward compatible
|
// Backward compatible
|
||||||
// Assign all properties of lg to window
|
// Assign all properties of lg to window
|
||||||
@@ -263,6 +267,7 @@ onMounted(async () => {
|
|||||||
window['app'] = comfyApp
|
window['app'] = comfyApp
|
||||||
window['graph'] = comfyApp.graph
|
window['graph'] = comfyApp.graph
|
||||||
|
|
||||||
|
comfyAppReady.value = true
|
||||||
emit('ready')
|
emit('ready')
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user