Merge origin/sub_laptop_6 — D02 기준 지정 · 다국어 사전 충돌 풂(528-2 대시보드 · 529-3 D02 글 모두 살림)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-25 20:14:26 +09:00
co-authored by Claude Opus 5.5
5 changed files with 335 additions and 10 deletions
+19 -7
View File
@@ -104,8 +104,13 @@ export interface MapPin {
export interface EditMap {
root: HTMLElement;
/** 표지 · 길 선 다시 놓고 맞춤 */
set: (pins: MapPin[], lines: Array<Array<[number, number]>>) => void;
/** 표지 · 길 선 다시 놓고 맞춤 · colors = 선마다 색 · focus = 고친 표지 key(529-3 · 없으면 지금 규칙) */
set: (
pins: MapPin[],
lines: Array<Array<[number, number]>>,
colors?: string[],
focus?: string,
) => void;
}
/** 고르는 지도 — 움직일 표지 끌기 = onMove · 지도 누름 = onClick(있을 때만) · 점 없으면 center(경도, 위도) */
@@ -122,7 +127,12 @@ export function editMap(opts: {
let drawn: KOverlay[] = [];
let fitted = false; // 153 — 처음 한 번만 맞춤 · 그 뒤 고름 · 끌기는 보기(중심 · 줌) 그대로
const set = (pins: MapPin[], lines: Array<Array<[number, number]>>): void => {
const set = (
pins: MapPin[],
lines: Array<Array<[number, number]>>,
colors?: string[],
focus?: string,
): void => {
loadKakaoMaps().then(
(maps) =>
requestAnimationFrame(() => {
@@ -146,11 +156,11 @@ export function editMap(opts: {
drawn.forEach((o) => o.setMap(null));
drawn = [
...lines.map(
(line) =>
(line, index) =>
new maps.Polyline({
path: line.map(([lat, lon]) => new maps.LatLng(lat, lon)),
strokeWeight: 6,
strokeColor: LINE_COLOR,
strokeColor: colors?.[index] ?? LINE_COLOR,
strokeOpacity: 0.9,
}),
),
@@ -185,9 +195,11 @@ export function editMap(opts: {
];
drawn.forEach((o) => o.setMap(map));
if (fitted) {
// 보기 밖 표지만 그쪽으로 옮김(줌 그대로)
// 보기 밖 표지만 그쪽으로 옮김(줌 그대로) · focus 를 주면 그 표지만 봄
const view = map.getBounds();
const out = moving.find((p) => !view.contain(new maps.LatLng(p.lat, p.lon)));
const out = (focus === undefined ? moving : moving.filter((p) => p.key === focus)).find(
(p) => !view.contain(new maps.LatLng(p.lat, p.lon)),
);
if (out) map.panTo(new maps.LatLng(out.lat, out.lon));
} else if (points.length > 1) {
const bounds = new maps.LatLngBounds();
+17
View File
@@ -110,4 +110,21 @@ export const ui_locales_de = {
DE_Assigned_Update: ["업데이트 있음", "Update available"],
DE_Assigned_View: ["보기", "View"],
DE_Assigned_Link: ["연결", "Link"],
/* --- D02 기준 지정(529-3) --- */
D02_Points_Title: ["연도 지점", "Yearly Points"],
D02_Points_Hint: [
"📍 로 고른 지점을 지도 누름으로 놓고 · 표지를 끌거나 경도 · 위도를 넣습니다. 직전 종점 = 다음 시점.",
"Pick a point with 📍 and click the map, drag markers, or type lon · lat. Each end is the next start.",
],
D02_Start: ["시점", "start"],
D02_End: ["종점", "end"],
D02_Lon: ["경도", "Lon"],
D02_Lat: ["위도", "Lat"],
D02_Pick_Point: ["지도에 놓을 지점 고르기", "Pick the point to place on the map"],
D02_Map_Hint: ["지도를 눌러 지점을 놓습니다.", "Click the map to place a point."],
D02_Save: ["저장", "Save"],
D02_Saved: ["지점을 저장했습니다.", "Points saved."],
D02_Saved_Crs: ["저장 좌표계", "Saved CRS"],
D02_Not_Saved: ["아직 저장 안 함", "Not saved yet"],
} as const satisfies Record<string, LocaleEntry>;