test(b06): 남은 시험 빨강 둘 정리 — 91 소단 기대값 178-2 규칙 · B07 횡단 범위 번들 document 가드(186-2)
- test_91: 구조물 끝 절토선엔 소단 없음(소단 = 성토 사면 한 단 · 178-2) - Cross_Panel_Base: document 없을 때 pointerdown 듣개 안 붙임 — Node 번들(B07 횡단 범위) 실행 살림 · 화면 동작 그대로 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F3mdb91125mPoC6tpsQx4P
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user