From 15f353791bafc586cea344c7a53d9029e4bdad5a Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Wed, 13 May 2026 13:26:48 +0200 Subject: [PATCH] Add logic to detect and filter spline corridor junctions related to selected paths --- src/app/App.tsx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/app/App.tsx b/src/app/App.tsx index 6816410d..3b064e2e 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -2818,6 +2818,29 @@ export function App({ terrainList ); const selectedPath = getSelectedPath(editorState.selection, pathList); + const splineCorridorJunctionList = getSplineCorridorJunctions( + editorState.document.splineCorridorJunctions + ); + const splineCorridorJunctionCandidates = detectSplineCorridorJunctionCandidates({ + paths: pathList, + junctions: editorState.document.splineCorridorJunctions, + terrains: terrainList.filter((terrain) => terrain.enabled) + }); + const selectedPathJunctionCandidates = + selectedPath === null + ? [] + : splineCorridorJunctionCandidates.filter((candidate) => + candidate.connections.some( + (connection) => connection.pathId === selectedPath.id + ) + ); + const selectedPathJunctions = + selectedPath === null + ? [] + : getSplineCorridorJunctionsConnectedToPath({ + junctions: editorState.document.splineCorridorJunctions, + pathId: selectedPath.id + }); const selectedPathPointState = getSelectedPathPointState( editorState.selection, selectedPath