From bcc9009278ae6c0abddece90c7d7e973e63be2a5 Mon Sep 17 00:00:00 2001 From: Lucio Lelii Date: Wed, 30 Sep 2026 09:11:05 +0200 Subject: [PATCH] fix(editor): clear wire selection before node drag --- src/app/utilities/rete-editor.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/utilities/rete-editor.ts b/src/app/utilities/rete-editor.ts index 73fb065..7fc14ed 100644 --- a/src/app/utilities/rete-editor.ts +++ b/src/app/utilities/rete-editor.ts @@ -36,6 +36,7 @@ import { import { BlocksService } from "@services/blocks/blocks"; import { ContainersService } from "@services/containers/containers"; import { ResourcesService } from "@services/resources/resources"; +import { GraphSelectionService } from "@services/graph-selection/graph-selection"; import { EditorStateHolder } from "@stores/flow-editor"; import { ContainerNodeComponent } from "@shared/nodes/container-node/container-node"; import { GenericNodeComponent } from "@shared/nodes/generic-node/generic-node"; @@ -107,6 +108,7 @@ export async function createEditor( const area = new AreaPlugin(container); const connection = new ConnectionPlugin(); const render = new AngularPlugin({ injector }); + const graphSelection = injector.get(GraphSelectionService); const nodeView = options?.nodeView ?? "editor"; const readonly = options?.readonly === true; const programmaticTranslations = new Set(); @@ -223,6 +225,9 @@ export async function createEditor( }); area.addPipe((context: any) => { + // The connection renderer raises only the selected wire. A picked node is about to be dragged, + // so clear that selection before its card can be drawn below the wire. + if (context?.type === 'nodepicked') graphSelection.clearConnectionSelection(); if (context?.type === 'nodetranslated') { // A loop follows only its own endpoints. A card merely crossed by the wire must not make the // wire move away, while moving either endpoint keeps the wire 48px above that endpoint.