From 527dd27efff03899a774fd4d0ac5066d80374a84 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Tue, 6 Oct 2026 14:20:36 +0900 Subject: [PATCH] =?UTF-8?q?=EF=BB=BFfeat(B06):=2054-37=20=ED=9A=A1?= =?UTF-8?q?=EB=8B=A8=20=EC=B9=B4=EB=93=9C=20=EB=85=B8=ED=8F=AD=20=C2=B7=20?= =?UTF-8?q?=EB=85=B8=EA=B2=AC=20=EA=B8=80=EC=9D=84=20X=20=EC=B6=95=20?= =?UTF-8?q?=EB=9D=BC=EB=B2=A8=20=EB=B0=94=EB=A1=9C=20=EC=9C=84=20=EA=B0=80?= =?UTF-8?q?=EC=9A=B4=EB=8D=B0=EB=A1=9C=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 카드 SVG 고정 자리(그림 칸 가운데 · 하단 −4px) · 확대·이동과 무관 - B07 은 종전 자리 유지(선택 인자 없음) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01EYJJRCfHfdCGNhmXTjQKV7 --- B06_Section/B06_Section_UI_Cross_Design.ts | 11 ++++++++--- B06_Section/B06_Section_UI_Cross_View.ts | 6 +++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/B06_Section/B06_Section_UI_Cross_Design.ts b/B06_Section/B06_Section_UI_Cross_Design.ts index 7a340cb16..47e973173 100644 --- a/B06_Section/B06_Section_UI_Cross_Design.ts +++ b/B06_Section/B06_Section_UI_Cross_Design.ts @@ -546,6 +546,8 @@ export function appendCrossDesignOverlay( minSlope?: { points: Array<{ offset: number; elevation: number }> }; maxSlope?: { points: Array<{ offset: number; elevation: number }> }; }, + // 노폭 라벨 고정 자리(B06 카드 — X 축 라벨 바로 위 가운데). 없으면 노면 위. + labelAt?: { layer: SVGElement; x: number; y: number }, ): void { const line = design.design_line; if (!line || line.length < 2) return; @@ -754,8 +756,11 @@ export function appendCrossDesignOverlay( const shoulderLeft = roadEdges ? roadEdges.left.offset_m - edges.left.offset_m : null; const shoulderRight = roadEdges ? edges.right.offset_m - roadEdges.right.offset_m : null; const label = document.createElementNS(SVG_NS, "text"); - label.setAttribute("x", String((x(edges.left.offset_m) + x(edges.right.offset_m)) / 2)); - label.setAttribute("y", String(toDisplayY(edges.left.elevation_m) - 6)); + label.setAttribute( + "x", + String(labelAt?.x ?? (x(edges.left.offset_m) + x(edges.right.offset_m)) / 2), + ); + label.setAttribute("y", String(labelAt?.y ?? toDisplayY(edges.left.elevation_m) - 6)); label.setAttribute("class", "b06-chart__carriageway-label"); const widthText = widened > 0.001 && typeof standardWidth === "number" @@ -770,7 +775,7 @@ export function appendCrossDesignOverlay( : `좌 ${shoulderLeft.toFixed(2)} / 우 ${shoulderRight.toFixed(2)}m` }` : widthText; - svg.append(label); + (labelAt?.layer ?? svg).append(label); } } diff --git a/B06_Section/B06_Section_UI_Cross_View.ts b/B06_Section/B06_Section_UI_Cross_View.ts index d848011e6..a24d78716 100644 --- a/B06_Section/B06_Section_UI_Cross_View.ts +++ b/B06_Section/B06_Section_UI_Cross_View.ts @@ -468,7 +468,11 @@ export function createCrossSectionCard( // (2026-09-06 사용자 확정: 구조물 자체 면적을 빼는 것이 아니다). 그림과 면적이 // 같은 트림 값을 쓰므로 "그림은 이런데 수량은 저렇다"가 생기지 않는다. applyStructureAreas(section, designTrim); - appendCrossDesignOverlay(plotLayer, section.design, x, toDisplayY, drawSamples, designTrim); + appendCrossDesignOverlay(plotLayer, section.design, x, toDisplayY, drawSamples, designTrim, { + layer: svg, + x: (CROSS_PAD.left + widthPx - CROSS_PAD.right) / 2, + y: heightPx - CROSS_PAD.bottom - 4, + }); // 사토장(유용토운반작업장) — 교본 6장 3절이 횡단도 표시를 요구한다. 값은 설계 결과에서 // 그대로 오고 여기서 다시 세지 않는다. 선 종류는 터파기 파선과 갈라 둔다. appendSpoilFillOverlay(plotLayer, section.design, x, toDisplayY);