From 29bf8c998cef9f9fc7f9155b7f2d7b1d9d66bc43 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sat, 17 Oct 2026 14:44:40 +0900 Subject: [PATCH] =?UTF-8?q?feat(381-2=20B05=20=ED=8F=89=EB=A9=B4):=20[?= =?UTF-8?q?=EC=B8=A1=EC=A0=90]=20[=EA=B8=B0=EC=9A=B8=EA=B8=B0]=20=EC=BC=AC?= =?UTF-8?q?=EB=81=94=20=EB=8B=A8=EC=B6=94(=EC=A0=88/=EC=84=B1=ED=86=A0?= =?UTF-8?q?=EC=84=A0=20=EC=99=BC=EC=AA=BD=20=C2=B7=20=EA=B8=B0=EB=B3=B8=20?= =?UTF-8?q?=EC=BC=AC=20=C2=B7=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=8F=99?= =?UTF-8?q?=EC=95=88)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 새 _Marks 켬끔 모듈 · 다시 그림은 _Footprint scheduleRedraw 공유 - [측점] 끔 = 눈금 · 번호 · 눈금 집기 없음 · 시점 · 종점 이름표 남김 - [기울기] 끔 = 기울기 라벨 · 높이 요청 없음 - 시험 test_381_2_routeedit_marks · 도구줄 차례 시험에 두 단추 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013QyNXY2TUKXCFMwAca2APG --- .../B05_Profile_UI_RouteEdit_Chrome.ts | 10 +++- .../B05_Profile_UI_RouteEdit_Footprint.ts | 3 +- B05_Profile/B05_Profile_UI_RouteEdit_Marks.ts | 30 ++++++++++ .../B05_Profile_UI_RouteEdit_Pointer.ts | 3 + .../B05_Profile_UI_RouteEdit_Render.ts | 30 +++++----- .../tester/test_381_2_routeedit_marks.py | 58 +++++++++++++++++++ .../tester/test_b05_routeedit_initial.py | 2 + 7 files changed, 121 insertions(+), 15 deletions(-) create mode 100644 B05_Profile/B05_Profile_UI_RouteEdit_Marks.ts create mode 100644 resources/tester/test_381_2_routeedit_marks.py 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"', "|",