feat(b06): [상세] 모달 첫 보기 = 중심점이 칸 가운데 · 그림 전체가 들어가게 축마다 큰 쪽 반폭 · [⤢] · 더블클릭 원복 같은 보기 (295-2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014utrjfoW831Vc5wJUd13kL
This commit is contained in:
2026-10-12 22:01:18 +09:00
co-authored by Claude Opus 5.5
parent 1ca7e61b08
commit 4eccca40d0
6 changed files with 75 additions and 8 deletions
+4 -2
View File
@@ -92,6 +92,8 @@ function el(tag) {
};
return walk(self);
},
// 첫 보기 꼭짓점(295-2) — 이 그림엔 꺾은선 · 다각형 없음
querySelectorAll: () => [],
addEventListener: (type, fn) => (listeners[type] ??= []).push(fn),
fire: (type, event) => {
const full = { preventDefault() {}, stopPropagation() {}, pointerId: 1, ...event };
@@ -109,7 +111,7 @@ globalThis.document = { createElementNS: (_ns, tag) => el(tag), createElement: e
const { attachDetailZoom } = loadTs(path.join(B06, "B06_Section_UI_Cross_Detail.ts"));
// 카드 svg 꼴 — 바탕 · 축 층 · clip 그룹 > 도형 층 > 십자(중심 300,150)
// 카드 svg 꼴 — 바탕 · 축 층 · clip 그룹 > 도형 층 > 십자(중심 319,142 = 칸 가운데 · 295-2 첫 보기 = 1배)
const AXES = {
widthPx: 600,
heightPx: 300,
@@ -126,7 +128,7 @@ function chart() {
const clipGroup = svgElement("g", { "clip-path": "url(#c)" });
const plot = svgElement("g", { class: "b06-chart__plot-layer" });
const center = svgElement("g", { class: "b06-chart__center" });
center.append(svgElement("line", { x1: 300, y1: 132, x2: 300, y2: 168 }));
center.append(svgElement("line", { x1: 319, y1: 124, x2: 319, y2: 160 }));
plot.append(center);
clipGroup.append(plot);
svg.append(svgElement("rect"), axes, clipGroup, svgElement("line", { class: "b06-chart__axis" }));
+2 -2
View File
@@ -54,8 +54,8 @@ def test_축_고정_도형_층만_움직임_눈금_다시(out):
assert out["axesTransform"] is None and out["clipTransform"] is None
assert out["ticksChanged"] is True and out["ticksAfter"] > 0
assert out["restoredTicksShifted"] is True # 다시 떠도 이어 간 범위로
# 확대 — 십자는 중심(300,150)에서 배율 되돌림
assert out["centerTransform"].startswith("translate(300 150) scale(0.869")
# 확대 — 십자는 중심(319,142 · 칸 가운데)에서 배율 되돌림
assert out["centerTransform"].startswith("translate(319 142) scale(0.869")
assert out["noAxesHandle"] is True # 축 옵션 없음 = 줌만
assert out["noLayer"] is None # 도형 층 없음 = 줌 없음
+1 -1
View File
@@ -81,5 +81,5 @@ def test_배선():
in view
)
src = " ".join(_read("B06_Section_UI_Cross_Detail.ts").split())
assert "drawn.homeScale" in src and "homeScale, onChange" in src
assert "drawn.homeScale" in src and "homeScale, home, onChange" in src # 295-2 첫 보기
assert "homeScale: drawn.homeScale" in src