diff --git a/B05_Profile/B05_Profile_UI_RouteEdit_Chrome.ts b/B05_Profile/B05_Profile_UI_RouteEdit_Chrome.ts index 982dde338..1556d97a1 100644 --- a/B05_Profile/B05_Profile_UI_RouteEdit_Chrome.ts +++ b/B05_Profile/B05_Profile_UI_RouteEdit_Chrome.ts @@ -1,5 +1,6 @@ import { createButton } from "@ui/ui_template_elements"; import { bindFootprintToggle } from "./B05_Profile_UI_RouteEdit_Footprint"; +import { bindMarkToggle } from "./B05_Profile_UI_RouteEdit_Marks"; /* ============================================================================= * B05_Profile_UI_RouteEdit_Chrome.ts @@ -11,7 +12,8 @@ import { bindFootprintToggle } from "./B05_Profile_UI_RouteEdit_Footprint"; * **배치**(352-1) — 지도가 칸 전체 · 머리 줄 · 테두리 없음. 도구는 3D 와 같은 떠 있는 유리 단추 * (지도 왼쪽 위 · ☰ 비킴), [?] 조작 설명은 도구줄 아래 2열, 상태·범례는 왼쪽 아래, 잰 값은 오른쪽 * 아래. 횡단 두 판은 지도 오른쪽을 덮는 판(아래 종단 판이 그 위). - * 도구줄 차례(366-2) — [?] | ↶ ↷ | 3D | ⟲ ⟳ · 1m 등고선 · 절/성토선 · 거리 재기 | 측점 스냅 · 분석 지형. + * 도구줄 차례(366-2 · 381-2) — [?] | ↶ ↷ | 3D | ⟲ ⟳ · 1m 등고선 · 측점 · 기울기 · 절/성토선 · 거리 재기 | + * 측점 스냅 · 분석 지형. * * 자리(345-3) — 모달이 아니라 종단 보기 가운데 위 본문(옛 3D 자리)에 붙는다. 덮개 · 전체 화면 · * 닫기 단추는 걷었다 · [취소] · [확인] · [노선 반영] · [저장 전으로]는 없앰(346-3 · 352-2 — 노선은 페이지 @@ -89,6 +91,10 @@ export function createRouteEditChrome( + + " in chrome and ">기울기" in chrome + assert '[data-act="stations"]\')!, "stations")' in chrome + assert '[data-act="slopes"]\')!, "slopes")' in chrome + + +def test_측점_끄면_눈금만_빠지고_이름표_남음(): + render = _read("B05_Profile_UI_RouteEdit_Render.ts") + body = render[render.index("function drawStationMarks(") : render.index("function endLabel(")] + # 라벨 상자를 먼저 비우고(누름 판정) · 눈금은 켬일 때만 · 이름표는 밖 + assert body.index("setStationLabelBoxes(") < body.index('if (markShown("stations"))') + guard = body.index('if (markShown("stations"))') + assert guard < body.index("drawStationTicks(") < body.index("`시점 ") + assert body.count("endLabel(") == 2 + + +def test_기울기_끄면_라벨도_높이_요청도_없음(): + render = _read("B05_Profile_UI_RouteEdit_Render.ts") + assert 'if (markShown("slopes")) scene.overStations?.(context);' in render + assert render.count("scene.overStations?.(context)") == 1 + + +def test_측점_끄면_눈금_집기_없음(): + pointer = _read("B05_Profile_UI_RouteEdit_Pointer.ts") + # 집기에 쓰는 눈금 찾기는 켬일 때만 — 라벨 0개면 전부 집히는 함정 + at = 0 + calls = 0 + while (at := pointer.find("stationAtScreen(", at + 1)) >= 0: + calls += 1 + assert 'markShown("stations")' in pointer[at - 300 : at], at + assert calls >= 1 diff --git a/resources/tester/test_b05_routeedit_initial.py b/resources/tester/test_b05_routeedit_initial.py index 43647248b..9b1b1429a 100644 --- a/resources/tester/test_b05_routeedit_initial.py +++ b/resources/tester/test_b05_routeedit_initial.py @@ -223,6 +223,8 @@ def test_노선_추천_다듬기_23_3(): 'data-act="rotate-ccw"', 'data-act="rotate-cw"', 'data-act="contour-minor"', + 'data-act="stations"', # 381-2 [측점] [기울기] = 절/성토선 왼쪽 + 'data-act="slopes"', 'data-act="footprint"', 'data-act="measure"', "|",