From d702cdfdf94598d48e2483e69930ae0b3b60accd Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Wed, 13 May 2026 13:59:03 +0200 Subject: [PATCH] Refactor App component and update terrain-related tests --- src/app/App.tsx | 48 ++++----- tests/domain/terrains.test.ts | 100 ++++++++++++++---- .../terrain-foundation.integration.test.tsx | 3 +- 3 files changed, 101 insertions(+), 50 deletions(-) diff --git a/src/app/App.tsx b/src/app/App.tsx index 63e6327a..911564c2 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -2816,12 +2816,11 @@ export function App({ terrainList ); const selectedPath = getSelectedPath(editorState.selection, pathList); - const splineCorridorJunctionCandidates = - detectSplineCorridorJunctionCandidates({ - paths: pathList, - junctions: editorState.document.splineCorridorJunctions, - terrains: terrainList.filter((terrain) => terrain.enabled) - }); + const splineCorridorJunctionCandidates = detectSplineCorridorJunctionCandidates({ + paths: pathList, + junctions: editorState.document.splineCorridorJunctions, + terrains: terrainList.filter((terrain) => terrain.enabled) + }); const selectedPathJunctionCandidates = selectedPath === null ? [] @@ -9651,7 +9650,10 @@ export function App({ const handleTerrainPaintLayerChange = (value: string) => { setActiveTerrainPaintLayerIndex( - clampTerrainPaintLayerIndex(Number(value), selectedTerrain?.layers.length) + clampTerrainPaintLayerIndex( + Number(value), + selectedTerrain?.layers.length + ) ); }; @@ -9992,9 +9994,7 @@ export function App({ const handleDeleteSplineCorridorJunction = (junctionId: string) => { try { - store.executeCommand( - createDeleteSplineCorridorJunctionCommand(junctionId) - ); + store.executeCommand(createDeleteSplineCorridorJunctionCommand(junctionId)); setStatusMessage("Deleted spline corridor junction."); } catch (error) { setStatusMessage(getErrorMessage(error)); @@ -21491,10 +21491,7 @@ export function App({
{selectedTerrain.layers.map((layer, layerIndex) => (
-