fix(B05·B06): 유토곡선 토량 분배 때 종단 · 표 스크롤 유지 · 횡단 보기 = 보기 반폭 그대로 · 십자선 크기 고정 · 보기 반폭 기본 10 m(79-1~4)

- 토량 분배(전체 맞춤) 중에는 유토곡선 ↔ 종단 스크롤 동기화를 끊음 — 0 으로 되돌던 것 없앰
- 횡단 카드는 사면 교차점 · 배수관 세트 폭으로 줌아웃하지 않음 · 밖은 가운데 버튼 팬 · ⤢ 는 보기값으로
- 줌인해도 중심 십자선 길이 그대로(도형 레이어 배율을 십자선 중심에서 되돌림)
- 횡단 보기 반폭 기본 12 → 10 m(계산 반폭과 따로)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019EMfGERKUg5nMMNQsyVZ2j
This commit is contained in:
2026-10-07 23:50:13 +09:00
co-authored by Claude Opus 5.5
parent 11148c60fb
commit fc1068a9cd
6 changed files with 33 additions and 39 deletions
+12 -3
View File
@@ -22,12 +22,13 @@ export interface CardFrameInput {
heightPx: number;
}
/** 십자선은 도형 레이어(줌·팬 따라감), 축선 · 축 이름은 틀 레이어(제자리)에 붙인다. */
/** 십자선은 도형 레이어(줌·팬 따라감), 축선 · 축 이름은 틀 레이어(제자리)에 붙인다.
* 돌려준 함수 = 배율이 바뀔 때 부름 — 십자선은 자리만 따라가고 크기는 그대로(PLAN 79-3). */
export function appendCardFrame(
svg: SVGElement,
plotLayer: SVGElement,
input: CardFrameInput,
): void {
): (scale: number) => void {
const { valid, centerX, designElevation, toY, widthPx, heightPx } = input;
const hasDesign = designElevation !== null;
const centerSample = valid.reduce<Sample | null>((nearest, sample) => {
@@ -38,7 +39,8 @@ export function appendCardFrame(
const centerElevation = hasDesign ? designElevation : (centerSample?.elevation_m ?? null);
const centerY = centerElevation !== null ? toY(centerElevation) : heightPx / 2;
const centerMarkerClass = `b06-chart__center-marker${hasDesign ? " b06-chart__center-marker--design" : ""}`;
plotLayer.append(
const marker = svgElement("g", { class: "b06-chart__center" });
marker.append(
svgElement("line", {
x1: centerX,
y1: centerY - 18,
@@ -54,6 +56,7 @@ export function appendCardFrame(
class: centerMarkerClass,
}),
);
plotLayer.append(marker);
svg.append(
svgElement("line", {
x1: CROSS_PAD.left,
@@ -77,6 +80,12 @@ export function appendCardFrame(
class: "b06-chart__axis-label",
}),
);
// 도형 레이어 배율을 십자선 중심에서 되돌림 — 자리는 따라가고 길이 18px 은 그대로.
return (scale) =>
marker.setAttribute(
"transform",
`translate(${centerX} ${centerY}) scale(${1 / Math.max(scale, 1e-6)}) translate(${-centerX} ${-centerY})`,
);
}
/**