From 21693e99630578ee05bad7becead480f353c75ee Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Wed, 13 May 2026 13:27:02 +0200 Subject: [PATCH] Implement junction management functions for spline corridor junctions --- src/app/App.tsx | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/src/app/App.tsx b/src/app/App.tsx index 3b064e2e..99904b8b 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -9964,6 +9964,48 @@ export function App({ ); }; + const handleCreateSplineCorridorJunction = ( + candidate: SplineCorridorJunctionCandidate + ) => { + try { + store.executeCommand( + createUpsertSplineCorridorJunctionCommand({ + junction: createSplineCorridorJunctionFromCandidate(candidate), + label: "Create spline corridor junction" + }) + ); + setStatusMessage("Created spline corridor junction."); + } catch (error) { + setStatusMessage(getErrorMessage(error)); + } + }; + + const handleSplineCorridorJunctionChange = ( + junction: SplineCorridorJunction, + successMessage: string + ) => { + try { + store.executeCommand( + createUpsertSplineCorridorJunctionCommand({ + junction, + label: "Update spline corridor junction" + }) + ); + setStatusMessage(successMessage); + } catch (error) { + setStatusMessage(getErrorMessage(error)); + } + }; + + const handleDeleteSplineCorridorJunction = (junctionId: string) => { + try { + store.executeCommand(createDeleteSplineCorridorJunctionCommand(junctionId)); + setStatusMessage("Deleted spline corridor junction."); + } catch (error) { + setStatusMessage(getErrorMessage(error)); + } + }; + const handleAddPathRepeater = () => { if (selectedPath === null) { setStatusMessage("Select a path before adding a repeater.");