diff --git a/frontend/src/lib/components/flows/map/InsertModuleButton.svelte b/frontend/src/lib/components/flows/map/InsertModuleButton.svelte index 3d4d5b3573..0fee79498c 100644 --- a/frontend/src/lib/components/flows/map/InsertModuleButton.svelte +++ b/frontend/src/lib/components/flows/map/InsertModuleButton.svelte @@ -37,7 +37,7 @@ > -
+
{#if funcDesc.length === 0} diff --git a/frontend/src/lib/components/graph/FlowGraphV2.svelte b/frontend/src/lib/components/graph/FlowGraphV2.svelte index 7db727d64a..bb88abfd98 100644 --- a/frontend/src/lib/components/graph/FlowGraphV2.svelte +++ b/frontend/src/lib/components/graph/FlowGraphV2.svelte @@ -120,7 +120,8 @@ { disableAi, insertable, - flowModuleStates + flowModuleStates, + selectedId: $selectedId }, failureModule, { @@ -131,12 +132,12 @@ insert: (detail) => { dispatch('insert', detail) }, - select: (mod) => { + select: (modId) => { if (!notSelectable) { - if ($selectedId != mod.id) { - $selectedId = mod.id + if ($selectedId != modId) { + $selectedId = modId } - dispatch('select', mod) + dispatch('select', modId) } }, delete: (detail, label) => { @@ -250,4 +251,8 @@ :global(.svelte-flow__controls-button:hover) { @apply bg-surface-hover; } + + :global(.svelte-flow__edgelabel-renderer) { + @apply z-50; + } diff --git a/frontend/src/lib/components/graph/graphBuilder.ts b/frontend/src/lib/components/graph/graphBuilder.ts index 52cbab0a82..8ad81232bf 100644 --- a/frontend/src/lib/components/graph/graphBuilder.ts +++ b/frontend/src/lib/components/graph/graphBuilder.ts @@ -4,7 +4,7 @@ import { type Node, type Edge } from '@xyflow/svelte' export type GraphEventHandlers = { insert: (detail) => void deleteBranch: (detail, label: string) => void - select: (mod: FlowModule) => void + select: (modId: string) => void delete: (detail, label: string) => void newBranch: (detail, label: string) => void move: (module: FlowModule, modules: FlowModule[], index: number) => void @@ -130,6 +130,9 @@ export default function graphBuilder( offset: currentOffset, label: `Branch ${branchIndex + 1}`, id: module.id, + branchIndex: branchIndex, + modules: modules, + eventHandlers: eventHandlers, ...extra }, position: { x: -1, y: -1 }, @@ -158,6 +161,7 @@ export default function graphBuilder( id: module.id, module: module, modules: modules, + eventHandlers: eventHandlers, ...extra }, position: { x: -1, y: -1 }, @@ -173,6 +177,7 @@ export default function graphBuilder( id: module.id, module: module, modules: modules, + eventHandlers: eventHandlers, ...extra }, position: { x: -1, y: -1 }, @@ -194,6 +199,7 @@ export default function graphBuilder( offset: currentOffset + 50, module: module, modules: modules, + eventHandlers: eventHandlers, ...extra }, position: { x: -1, y: -1 }, diff --git a/frontend/src/lib/components/graph/renderers/edges/BaseEdge.svelte b/frontend/src/lib/components/graph/renderers/edges/BaseEdge.svelte index 7ab41216bb..f4a6a746c3 100644 --- a/frontend/src/lib/components/graph/renderers/edges/BaseEdge.svelte +++ b/frontend/src/lib/components/graph/renderers/edges/BaseEdge.svelte @@ -43,7 +43,6 @@ : edgePath - {#if data?.insertable}
{/if} +