diff --git a/frontend/src/lib/components/graph/FlowGraphV2.svelte b/frontend/src/lib/components/graph/FlowGraphV2.svelte index bd13b86555..f3a8c46650 100644 --- a/frontend/src/lib/components/graph/FlowGraphV2.svelte +++ b/frontend/src/lib/components/graph/FlowGraphV2.svelte @@ -342,7 +342,7 @@ } const yOffset = insertable ? 100 : 0 - return dag.descendants().map((des) => ({ + const newNodes = dag.descendants().map((des) => ({ id: des.data.id, position: { x: des.x @@ -358,6 +358,9 @@ y: (des.y || 0) + yOffset + (nodeSpacingMap[des.data.id] ?? 0) / 2 } })) + + lastNodes = [nodes, newNodes] + return newNodes } let eventHandler = { diff --git a/frontend/src/lib/components/graph/renderers/nodes/NoteNode.svelte b/frontend/src/lib/components/graph/renderers/nodes/NoteNode.svelte index 49b020aef6..6bd5cf5503 100644 --- a/frontend/src/lib/components/graph/renderers/nodes/NoteNode.svelte +++ b/frontend/src/lib/components/graph/renderers/nodes/NoteNode.svelte @@ -41,13 +41,6 @@ const locked = $derived(data.locked ?? false) const textForDisplay = $derived(data.text ?? '') - // Sync textContent with data.text when not in edit mode - $effect(() => { - if (!editMode) { - textContent = data.text ?? '' - } - }) - function handleTextSave() { // Only update when done editing if (isEditModeAvailable && noteEditorContext?.noteEditor) {