From c0417a14c7a739afbcb7bb795b491a4ef0cd1370 Mon Sep 17 00:00:00 2001 From: Matteo Date: Mon, 23 Feb 2026 14:56:17 +0100 Subject: [PATCH] feat : plan du site (WIP) --- frontend/pages/infrastructure/building.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/pages/infrastructure/building.vue b/frontend/pages/infrastructure/building.vue index 4ee1aa1..77e73c4 100644 --- a/frontend/pages/infrastructure/building.vue +++ b/frontend/pages/infrastructure/building.vue @@ -19,7 +19,7 @@ v-for="entry in buildingLayouts" :key="entry.building.id" > -
+
{{ entry.building.label || `Bâtiment ${entry.building.id}` }}
@@ -158,7 +158,10 @@ const buildLayoutView = (layout: BuildingLayoutData): { const cellDrafts: GridCellDraft[] = [] // Tri visuel : de haut en bas, puis de gauche à droite - const positionsSorted = [...positions].sort((a, b) => (a.y ?? 1) - (b.y ?? 1) || (a.x ?? 1) - (b.x ?? 1)) + const positionsSorted = [...positions].sort( + (leftPosition, rightPosition) => + (leftPosition.y ?? 1) - (rightPosition.y ?? 1) || (leftPosition.x ?? 1) - (rightPosition.x ?? 1) + ) for (const position of positionsSorted) { const x = position.x ?? 1 const y = position.y ?? 1