diff --git a/frontend/src/lib/components/flows/map/FlowModuleSchemaMap.svelte b/frontend/src/lib/components/flows/map/FlowModuleSchemaMap.svelte index 07f7dab9ff..8d8d7c1217 100644 --- a/frontend/src/lib/components/flows/map/FlowModuleSchemaMap.svelte +++ b/frontend/src/lib/components/flows/map/FlowModuleSchemaMap.svelte @@ -616,6 +616,7 @@ {onCancelTestFlow} {onOpenPreview} {onHideJobStatus} + exitNoteMode={() => (noteMode = false)} /> diff --git a/frontend/src/lib/components/flows/map/FlowStickyNode.svelte b/frontend/src/lib/components/flows/map/FlowStickyNode.svelte index 4c85b31f1b..c78114b42b 100644 --- a/frontend/src/lib/components/flows/map/FlowStickyNode.svelte +++ b/frontend/src/lib/components/flows/map/FlowStickyNode.svelte @@ -91,8 +91,8 @@ {/if} - {#snippet text()} {noteMode ? 'Exit note mode' : 'Add notes'} diff --git a/frontend/src/lib/components/graph/FlowGraphV2.svelte b/frontend/src/lib/components/graph/FlowGraphV2.svelte index 25e1273999..ebd181e4fc 100644 --- a/frontend/src/lib/components/graph/FlowGraphV2.svelte +++ b/frontend/src/lib/components/graph/FlowGraphV2.svelte @@ -133,6 +133,7 @@ onOpenPreview?: () => void onHideJobStatus?: () => void flowHasChanged?: boolean + exitNoteMode?: () => void } let { @@ -184,7 +185,8 @@ showJobStatus = false, suspendStatus = {}, flowHasChanged = false, - noteMode = false + noteMode = false, + exitNoteMode = undefined }: Props = $props() setContext<{ @@ -395,7 +397,6 @@ return false } - function onNoteAdded(newNoteFromTool: any) { // Add the note to our separate notes array if a note was created if (newNoteFromTool) { @@ -404,12 +405,12 @@ text: '', position: newNoteFromTool.position, size: newNoteFromTool.size || { width: 200, height: 100 }, - color: 'oklch(96.2% 0.059 95.617)' + color: 'oklch(96.7% 0.067 122.328)' } notes = [...notes, newNote] nextNoteId += 1 } - noteMode = false + exitNoteMode?.() updateStores() } diff --git a/frontend/src/lib/components/graph/NoteTool.svelte b/frontend/src/lib/components/graph/NoteTool.svelte index 6dd78967bc..0dd3163801 100644 --- a/frontend/src/lib/components/graph/NoteTool.svelte +++ b/frontend/src/lib/components/graph/NoteTool.svelte @@ -116,7 +116,7 @@ {#if previewNote}