Merge remote-tracking branch 'origin/sub_laptop_4' into sub_laptop_7

This commit is contained in:
2026-10-06 00:12:30 +09:00
8 changed files with 213 additions and 6 deletions
@@ -145,9 +145,12 @@ export function structureIdAtStation(
if (!stationId.startsWith(prefix)) return null;
const station = stations.find((entry) => irregularStationId(entry.id) === stationId);
if (!station) return null;
const hit = structures.find(
const near = structures.filter(
(item) => Math.abs(structureAnchorM(item) - station.chainage_m) < SAME_CHAINAGE_M,
);
// 관 측점선의 짝은 관 알약(`pipe-*`)이다 — 같은 측점 다른 구조물(포장 등)을 켜면 그 알약을
// 누를 때 해제로 읽혀 안 골라졌다(52-15).
const hit = near.find((item) => String(item.structure_id ?? "").startsWith("pipe-")) ?? near[0];
return hit?.structure_id ?? null;
}