From 34c779a3ab9bf42fe7e0dd8ea98b277f441dae25 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Wed, 13 May 2026 02:59:26 +0200 Subject: [PATCH] Implement handler to change specific road edge settings for selected path --- src/app/App.tsx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/app/App.tsx b/src/app/App.tsx index 6e6f777f..97a9e431 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -9817,6 +9817,28 @@ export function App({ } }; + const handlePathRoadEdgeChange = ( + side: ScenePathRoadEdgeSide, + edge: ScenePath["road"]["edges"][ScenePathRoadEdgeSide], + successMessage: string + ) => { + if (selectedPath === null) { + setStatusMessage("Select a path before changing road edge settings."); + return; + } + + handlePathRoadChange( + { + ...selectedPath.road, + edges: { + ...selectedPath.road.edges, + [side]: edge + } + }, + successMessage + ); + }; + const handleApplyPathRoadToTerrain = () => { if (selectedPath === null) { setStatusMessage("Select a path before applying its road to terrain.");