From 09bef8b0ee855cff7416a72025c33ffb8d7b244d Mon Sep 17 00:00:00 2001 From: umsangdon Date: Fri, 30 Oct 2026 16:22:33 +0900 Subject: [PATCH] =?UTF-8?q?fix(D=20=EC=98=88=EC=A0=95=EB=85=B8=EC=84=A0):?= =?UTF-8?q?=20=EB=B0=9B=EA=B8=B0=EC=97=90=20=EB=8A=98=20=EC=A7=80=EA=B8=88?= =?UTF-8?q?=20=EA=B8=B0=EC=A4=80=EC=A0=90=EC=9D=84=20=EC=8B=A4=EC=9D=8C=20?= =?UTF-8?q?=E2=80=94=20=EC=A0=80=EC=9E=A5=EB=90=9C=20=EC=9E=90=EB=A6=AC?= =?UTF-8?q?=EB=A1=9C=20=EB=90=98=EB=8F=8C=EC=95=84=EC=99=80=EB=8F=84=20?= =?UTF-8?q?=E3=80=8C=EB=A9=80=EB=A6=AC=20=EC=98=AE=EA=B9=80=E3=80=8D=20?= =?UTF-8?q?=EB=AC=BC=EC=9D=8C=20(PLAN=20596-2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 저장된 자리와 같으면 기준점을 안 실어 서버가 옛 범위와 합치려다 칸 상한으로 거절되던 길 - 들어올 때 범위 · 받기 · 다시 받기 모두 기준점 둘레를 함께 봄 · [저장] 몸 site 는 바뀐 때만 Co-Authored-By: Claude Opus 5.5 --- D03_PlanAnalysis/D03_PlanAnalysis_UI_Page.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/D03_PlanAnalysis/D03_PlanAnalysis_UI_Page.ts b/D03_PlanAnalysis/D03_PlanAnalysis_UI_Page.ts index a83b23978..590e97774 100644 --- a/D03_PlanAnalysis/D03_PlanAnalysis_UI_Page.ts +++ b/D03_PlanAnalysis/D03_PlanAnalysis_UI_Page.ts @@ -250,11 +250,10 @@ export async function renderD03PlanAnalysis(root: HTMLElement): Promise { const allVertices = (): Vertex[] => network.lines.flatMap((line) => line.vertices); const snap = (): Snap => ({ network, points, pointNames, site }); - /** 위치를 옮기고 [저장] 전 — 받기 · 범위 물음에 새 기준점을 실음. */ - const moved = (): TerrainAim["center"] => - site && JSON.stringify(site) !== JSON.stringify(savedSite) - ? { lon: site.lon, lat: site.lat } - : null; + /** 위치를 옮기고 [저장] 전 — [저장] 몸에 기준점을 실음. */ + const moved = (): boolean => !!site && JSON.stringify(site) !== JSON.stringify(savedSite); + /** 받기 · 범위에 늘 지금 기준점(캐시)을 실음 — 받은 범위에서 멀면 서버가 물음(저장된 자리로 되돌아올 때도). */ + const center = (): TerrainAim["center"] => (site ? { lon: site.lon, lat: site.lat } : null); /** 기준점 둘레 ±1 km(작업 좌표) — 처음 맞춤 · 위치 옮김 · 임도망 맞춤. */ const around = (at: Site | null): Vertex[] => { const tm = tmParams(epsg); @@ -381,7 +380,7 @@ export async function renderD03PlanAnalysis(root: HTMLElement): Promise { * 아니오 = 안 받음(거짓). 이미 도는 일(다른 창)이면 그것을 지켜봄. */ async function download(extra: Vertex[]): Promise { busy = true; // 요청이 가는 동안 다른 받기를 막음(지켜보기가 이어 받음) - const where: TerrainAim = { center: moved() }; + const where: TerrainAim = { center: center() }; try { let answer: TerrainStart = await startTerrain(projectId, null, extra, where); if (answer.status === "far" || answer.status === "band") { @@ -659,7 +658,7 @@ export async function renderD03PlanAnalysis(root: HTMLElement): Promise { await follow(); } else if (editable && !job.error) { // 들어올 때 받은 범위가 기준점 둘레 · 지점을 못 덮으면 바로 받기(서버가 셈 · 실패 뒤엔 [다시 받기]) - const extent = await fetchTerrainExtent(projectId, null, [], moved()); + const extent = await fetchTerrainExtent(projectId, null, [], center()); ready = true; if (!extent.covered) await download([]); else await ensureCovered();