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

@@ -21,6 +21,7 @@ import { WorkflowContext } from './context'
type Shape = {
appId: string
panelWidth: number
workflowRunningData?: WorkflowRunningData
setWorkflowRunningData: (workflowData: WorkflowRunningData) => void
historyWorkflowData?: HistoryWorkflowData
@@ -72,6 +73,7 @@ type Shape = {
export const createWorkflowStore = () => {
return createStore<Shape>(set => ({
appId: '',
panelWidth: localStorage.getItem('workflow-node-panel-width') ? parseFloat(localStorage.getItem('workflow-node-panel-width')!) : 420,
workflowRunningData: undefined,
setWorkflowRunningData: workflowRunningData => set(() => ({ workflowRunningData })),
historyWorkflowData: undefined,