fix(636-2): 가이드 선 글 자리 = 끝 지점 핀 아래 · 화면 오른쪽 반이면 오른쪽 맞춤(지점 이름 · 화면 끝에 안 걸림)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-01 12:03:48 +09:00
co-authored by Claude Opus 5.5
parent 527e50180b
commit a7abcd6c5f
@@ -148,7 +148,9 @@ export function createPlanGuide(opts: {
const s = summary();
const [x, y] = map.toScreen(end);
const text = `가이드 ${(s.lengthM / 1000).toFixed(2)} km · 최대 ${s.maxGradePct.toFixed(1)} % · 급경사 지남 ${s.steepPct.toFixed(0)} %`;
planLabel(context, map, x, y - 22, text, "bold 12px");
// 끝 지점 핀 아래 · 화면 오른쪽 반이면 오른쪽 맞춤(지점 이름 · 화면 끝에 안 걸림)
const right = x > context.canvas.clientWidth / 2;
planLabel(context, map, x, y + 16, text, "bold 12px", right ? "right" : "left");
},
};