mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-28 16:27:55 -05:00
ack comments
This commit is contained in:
@@ -2188,10 +2188,9 @@ const WorkflowContent = React.memo(() => {
|
||||
selected: selectedIds.has(node.id),
|
||||
}))
|
||||
})
|
||||
}, [derivedNodes, blocks, pendingSelection, clearPendingSelection, syncPanelWithSelection])
|
||||
}, [derivedNodes, blocks, pendingSelection, clearPendingSelection])
|
||||
|
||||
// Phase 2: When displayNodes updates, check if pending zoom blocks are ready
|
||||
// (Phase 1 is located earlier in the file where pendingZoomBlockIdsRef is defined)
|
||||
useEffect(() => {
|
||||
const pendingBlockIds = pendingZoomBlockIdsRef.current
|
||||
if (!pendingBlockIds || pendingBlockIds.size === 0) {
|
||||
|
||||
@@ -615,7 +615,20 @@ export const useWorkflowStore = create<WorkflowStore>()(
|
||||
options?: { updateLastSaved?: boolean }
|
||||
) => {
|
||||
set((state) => {
|
||||
const nextBlocks = workflowState.blocks || {}
|
||||
const incomingBlocks = workflowState.blocks || {}
|
||||
|
||||
const nextBlocks: typeof incomingBlocks = {}
|
||||
for (const [id, block] of Object.entries(incomingBlocks)) {
|
||||
if (block.data?.parentId && !incomingBlocks[block.data.parentId]) {
|
||||
nextBlocks[id] = {
|
||||
...block,
|
||||
data: { ...block.data, parentId: undefined, extent: undefined },
|
||||
}
|
||||
} else {
|
||||
nextBlocks[id] = block
|
||||
}
|
||||
}
|
||||
|
||||
const nextEdges = filterValidEdges(workflowState.edges || [], nextBlocks)
|
||||
const nextLoops =
|
||||
Object.keys(workflowState.loops || {}).length > 0
|
||||
|
||||
Reference in New Issue
Block a user