fix: separate hierarchy management from selected building editing

This commit is contained in:
jhartworks committed 2026-11-19 09:46:31 +01:00
1 parent bffc4d0acc
commit 382d6e04f2
18 files changed
+2103 -1648

No files matched your search

@@ -40,7 +40,8 @@ export function gridLayer(ctx: CanvasContext, size: { w: number; h: number }): L
/** The rooms of the floor below, faintly, as orientation; rooms below that rise through this floor are hatched – it stays open there. */
export function floorBelowLayer(ctx: CanvasContext): Layer {
const floors = ctx.host.doc.floors;
const current=ctx.host.doc.floors.find((f)=>f.id===ctx.floorId);
const floors = ctx.host.doc.topology?ctx.host.doc.floors.filter((f)=>current?.outdoor_location_id?f.outdoor_location_id===current.outdoor_location_id:!f.outdoor_location_id&&f.building_id===current?.building_id):ctx.host.doc.floors;
const at = floors.findIndex((f) => f.id === ctx.floorId);
const below = at > 0 ? floors[at - 1] : undefined;
if (!below) return nothing;