diff --git a/B06_Section/B06_Section_UI_Cross_Panel_Base.ts b/B06_Section/B06_Section_UI_Cross_Panel_Base.ts index f8b258525..08da4506a 100644 --- a/B06_Section/B06_Section_UI_Cross_Panel_Base.ts +++ b/B06_Section/B06_Section_UI_Cross_Panel_Base.ts @@ -75,13 +75,15 @@ export function buildPanelShell(onClose: () => void): { /** 마지막으로 누른 자리 — 방향키는 **초점 있는 쪽만** 받는다(계획서 24-3b). 횡단 보기에서 조정창과 * 종단도(▲▼ 계획고)가 한 화면에 함께 있어, 종단도를 누른 뒤에는 조정창이 방향키를 넘긴다. */ let lastPointer: Element | null = null; -document.addEventListener( - "pointerdown", - (event) => { - lastPointer = event.target instanceof Element ? event.target : null; - }, - true, -); +// 서버 Node 번들(B07 횡단 범위)도 이 파일을 실음 — document 없으면 듣개 안 붙임(186-2) +if (typeof document !== "undefined") + document.addEventListener( + "pointerdown", + (event) => { + lastPointer = event.target instanceof Element ? event.target : null; + }, + true, + ); /** 방향키가 종단도 몫인가 — 마지막으로 누른 자리가 종단도 안이면 참. */ export function arrowsBelongToProfile(): boolean { diff --git a/resources/tester/test_91_ground_free.py b/resources/tester/test_91_ground_free.py index 3ae13bcf1..70f2fda8a 100644 --- a/resources/tester/test_91_ground_free.py +++ b/resources/tester/test_91_ground_free.py @@ -117,9 +117,9 @@ def test_절토_쪽_배관_유출_벽_뒤_절토사면_살아남(fit: dict) -> N assert _knee(cut) and cut["endGap"] < 0.01 -def test_소단은_구조물_끝에서_새로_셈(fit: dict) -> None: - legs = fit["cutOutletBerm"]["legs"] - flat = next(i for i, leg in enumerate(legs) if leg["ratio"] is None) - assert sum(leg["slant"] for leg in legs[:flat]) == pytest.approx(3.0, abs=1e-3) - assert legs[flat]["run"] == pytest.approx(0.5, abs=1e-3) - assert fit["cutOutletBerm"]["endGap"] < 0.01 +def test_구조물_끝_절토엔_소단_없음(fit: dict) -> None: + """소단 = 성토 사면 한 단(178-2) — 측점에 소단이 있어도 구조물 끝 절토선은 그대로.""" + berm = fit["cutOutletBerm"] + assert all(leg["ratio"] is not None for leg in berm["legs"]) + assert berm["legs"] == fit["cutOutlet"]["legs"] + assert berm["endGap"] < 0.01