fix: full screen editor not follow panel width (#3876)

This commit is contained in:
Joel
2024-04-26 14:23:13 +08:00
committed by GitHub
parent f62b2b5b45
commit 7d711135bc
6 changed files with 33 additions and 17 deletions

View File

@@ -75,6 +75,11 @@ export const useWorkflow = () => {
const { handleSyncWorkflowDraft } = useNodesSyncDraft()
const { eventEmitter } = useEventEmitterContextContext()
const setPanelWidth = useCallback((width: number) => {
localStorage.setItem('workflow-node-panel-width', `${width}`)
workflowStore.setState({ panelWidth: width })
}, [workflowStore])
const handleLayout = useCallback(async () => {
workflowStore.setState({ nodeAnimation: true })
const {
@@ -353,6 +358,7 @@ export const useWorkflow = () => {
}, [workflowStore])
return {
setPanelWidth,
handleLayout,
getTreeLeafNodes,
getBeforeNodesInSameBranch,