diff --git a/src/components/__tests__/OutputNode.test.tsx b/src/components/__tests__/OutputNode.test.tsx index 6a70a6b7..e6a3b664 100644 --- a/src/components/__tests__/OutputNode.test.tsx +++ b/src/components/__tests__/OutputNode.test.tsx @@ -69,6 +69,7 @@ describe("OutputNode", () => { regenerateNode: vi.fn(), edges: [], isRunning: false, + runningNodeIds: new Set(), currentNodeIds: [], groups: {}, nodes: [], diff --git a/src/store/workflowStore.ts b/src/store/workflowStore.ts index 81115520..723a52c5 100644 --- a/src/store/workflowStore.ts +++ b/src/store/workflowStore.ts @@ -2348,12 +2348,11 @@ const workflowStoreImpl: StateCreator = (set, get) => ({ if (nodesToGroup.length === 0) return ""; pushUndoCheckpoint(get, set); - // Calculate bounding box of selected nodes + // Calculate bounding box from persisted style sizes. const nodeById = new Map(nodes.map((node) => [node.id, node])); const absolutePositionByNodeId = new Map(); let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity; nodesToGroup.forEach((node) => { - // Use measured dimensions (actual rendered size) first, then style, then type-specific defaults const { width, height } = getNodeSize(node); const absolutePosition = getAbsoluteNodePosition(node, nodeById); absolutePositionByNodeId.set(node.id, absolutePosition);