/* ============================================================================= * B05_Profile_UI_RouteEdit_Chrome.ts * 계획노선 편집 모달의 **뼈대** — 창·단추·오버레이 판을 만들고 자주 쓰는 요소를 집어 준다. * * `B05_Profile_UI_RouteEdit.ts` 가 700줄을 넘겨 떼어낸 조각이다(2026-09-12). 생김새만 있고 * 동작은 없다 — 배선은 본체와 각 조각(`_Apply`·`_Rotate`·`_History`…)이 한다. * * **배치**(2026-09-12 사용자 지시 ⑩~⑬·⑱) — 아래 정보행을 없애고 지도 위 오버레이로 옮겼다. * 단추는 제목행 오른쪽, 조작 설명은 지도 왼쪽 위 2열, 상태·범례는 왼쪽 아래, 잰 값은 오른쪽 * 아래. 메인 창은 왼쪽으로 밀고 오른쪽 세로 칸에 횡단 두 판이 앉는다. * ========================================================================== */ /** 회전 단추 아이콘 — **반만 도는 화살표**(2026-09-12 사용자 지시 ㉙). 한 바퀴를 다 그린 * 기호(`↺`·`↻`)는 「한 바퀴 돈다」로 읽혀 한 칸씩 도는 동작과 안 맞았다. */ const HALF_TURN_ICON = { ccw: ``, cw: ``, }; export interface RouteEditChrome { overlay: HTMLElement; canvas: HTMLCanvasElement; status: HTMLElement; busy: HTMLElement; measureBox: HTMLElement; measureText: HTMLElement; measureButton: HTMLButtonElement; } /** 모달을 만들어 `document.body` 에 붙이고, 자주 쓰는 요소를 집어 돌려준다. */ export function createRouteEditChrome(): RouteEditChrome { const overlay = document.createElement("div"); overlay.className = "b05-routeedit"; overlay.innerHTML = `
`; document.body.append(overlay); const canvas = overlay.querySelector(".b05-routeedit__canvas")!; const status = overlay.querySelector(".b05-routeedit__status")!; const measureBox = overlay.querySelector(".b05-routeedit__measure")!; const measureText = overlay.querySelector(".b05-routeedit__measure-text")!; const measureButton = overlay.querySelector('[data-act="measure"]')!; const busy = overlay.querySelector(".b05-routeedit__busy")!; return { overlay, canvas, status, busy, measureBox, measureText, measureButton }; }