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
commit 7d711135bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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,