From d78029697c7260ea59cdee7a8293f18d52610660 Mon Sep 17 00:00:00 2001 From: Benjamin Lu Date: Tue, 23 Sep 2025 11:52:56 -0700 Subject: [PATCH] cleanup unused --- .../core/canvas/links/linkConnectorAdapter.ts | 33 ++----------------- 1 file changed, 3 insertions(+), 30 deletions(-) diff --git a/src/renderer/core/canvas/links/linkConnectorAdapter.ts b/src/renderer/core/canvas/links/linkConnectorAdapter.ts index 964ce1e1a..b9ae1907a 100644 --- a/src/renderer/core/canvas/links/linkConnectorAdapter.ts +++ b/src/renderer/core/canvas/links/linkConnectorAdapter.ts @@ -1,14 +1,9 @@ import type { LGraph } from '@/lib/litegraph/src/LGraph' -import type { LGraphNode, NodeId } from '@/lib/litegraph/src/LGraphNode' -import type { Reroute, RerouteId } from '@/lib/litegraph/src/Reroute' +import type { NodeId } from '@/lib/litegraph/src/LGraphNode' +import type { RerouteId } from '@/lib/litegraph/src/Reroute' import { LinkConnector } from '@/lib/litegraph/src/canvas/LinkConnector' import type { RenderLink } from '@/lib/litegraph/src/canvas/RenderLink' -import type { - ConnectingLink, - ItemLocator -} from '@/lib/litegraph/src/interfaces' -import { layoutStore } from '@/renderer/core/layout/store/layoutStore' -import type { Point } from '@/renderer/core/layout/types' +import type { ConnectingLink } from '@/lib/litegraph/src/interfaces' import { app } from '@/scripts/app' // Keep one adapter per graph so rendering and interaction share state. @@ -41,24 +36,6 @@ export class LinkConnectorAdapter { return this.linkConnector.renderLinks } - /** ItemLocator backed by layoutStore for nodes/reroutes. */ - get locator(): ItemLocator { - const graph = this.network - - return { - getNodeOnPos: (x: number, y: number): LGraphNode | null => { - const id = layoutStore.queryNodeAtPoint(point(x, y)) - if (id == null) return null - return graph.getNodeById(id) as LGraphNode | null - }, - getRerouteOnPos: (x: number, y: number): Reroute | undefined => { - const r = layoutStore.queryRerouteAtPoint(point(x, y)) - if (!r) return undefined - return graph.getReroute(r.id) - } - } - } - // Drag helpers /** @@ -180,7 +157,3 @@ export function createLinkConnectorAdapter(): LinkConnectorAdapter | null { } return adapter } - -function point(x: number, y: number): Point { - return { x, y } -}