fix(D 예정노선): 위치 칸 검증 고침 — 빈 알림 · 빈 목록 숨김 · 멀다 물음 글 겹침 · 띠 넘김 맞춤 상자 · 임도망 거절 처리 (PLAN 596-2)

- 찾기 칸 알림 · 후보 줄이 비면 숨김(칸 사이 빈 틈)
- 멀다 물음 = 서버 글 그대로 · 띠 = 「그은 선 · 지점을 지웁니다」 덧
- 다른 TM 띠로 넘을 때 지도 맞춤 상자도 새 띠 좌표로
- 임도망 올리기 거절이 처리 안 된 거절로 새던 길 막음(알림은 그대로)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-30 15:26:44 +09:00
co-authored by Claude Opus 5.5
parent 36750b380f
commit 7c5303a79c
3 changed files with 29 additions and 14 deletions
@@ -257,9 +257,13 @@ export function createPlanLayers(opts: {
);
return info;
});
// 거절은 아래 catch 가 알림 — 기다림 몫은 삼킴(처리 안 된 거절 없음)
pending.set(
"forestRoadFile",
job.then(() => undefined),
job.then(
() => undefined,
() => undefined,
),
);
try {
return await job;
+3 -4
View File
@@ -388,9 +388,7 @@ export async function renderD03PlanAnalysis(root: HTMLElement): Promise<void> {
const band = answer.status === "band";
const ok = await askConfirm({
title: band ? "다른 좌표 띠로 옮김" : "멀리 옮김",
message: band
? `${answer.message} 그은 선 · 지점을 지우고 새 자리 둘레를 받습니다.`
: `${answer.message} 받은 지형을 버리고 새 자리 둘레를 받습니다.`,
message: band ? `${answer.message} 그은 선 · 지점을 지웁니다.` : answer.message,
okLabel: "새로 받기",
danger: band,
});
@@ -419,7 +417,8 @@ export async function renderD03PlanAnalysis(root: HTMLElement): Promise<void> {
epsg = next;
[network, points, pointNames] = [emptyNetwork(), [], []];
[undoStack, redoStack, have] = [[], [], null];
map.update({ epsg });
map.update({ epsg, fit: around(site) }); // 맞춤 상자도 새 띠 좌표로
map.fit();
keepDraft();
}
+21 -9
View File
@@ -8,7 +8,7 @@
import { pickFiles } from "@ui/ui_template_drop";
import { createButton } from "@ui/ui_template_elements";
import { createFindList, type FindList } from "@ui/ui_template_find_list";
import { createFindList, type FindList, type FindRow } from "@ui/ui_template_find_list";
import { t } from "@ui/ui_template_locale";
import { createText } from "@ui/ui_template_text";
import { searchPlaces, type PlaceHit } from "./D03_PlanAnalysis_Api";
@@ -41,26 +41,38 @@ export interface PlanSite {
* 등록(D01) 지도 머리 · 이 「위치」 칸이 같이 씀. */
export function createPlaceFind(onPick: (hit: PlaceHit) => void): FindList {
const find = createFindList({ placeholder: t("DE_Reg_Find") });
const list = find.root.querySelector<HTMLElement>(".ui-find__list")!;
let asked = 0; // 옛 찾기 답 버림
// 빈 알림 · 빈 목록은 숨김(칸 사이 빈 틈 없앰)
const say = (text: string): void => {
find.hint.textContent = text;
find.hint.hidden = !text;
};
const show = (rows: FindRow[]): void => {
find.setRows(rows);
list.hidden = !rows.length;
};
say("");
show([]);
async function run(): Promise<void> {
const query = find.search.value.trim();
find.setRows([]);
if (query.length < MIN_QUERY) return void (find.hint.textContent = t("DE_Reg_FindShort"));
show([]);
if (query.length < MIN_QUERY) return say(t("DE_Reg_FindShort"));
const at = ++asked;
find.hint.textContent = t("DE_Reg_FindBusy");
say(t("DE_Reg_FindBusy"));
try {
const hits = await searchPlaces(query);
if (at !== asked) return;
find.hint.textContent = hits.length ? "" : t("DE_Reg_FindNone");
find.setRows(
say(hits.length ? "" : t("DE_Reg_FindNone"));
show(
hits.map((hit, i) => ({
key: String(i),
tag: t(hit.kind === "place" ? "DE_Reg_FindPlace" : "DE_Reg_FindAddress"),
name: hit.title,
sub: hit.address !== hit.title ? hit.address : undefined,
onPick: () => {
find.setRows([]);
show([]);
find.search.value = hit.title;
onPick(hit);
},
@@ -68,11 +80,11 @@ export function createPlaceFind(onPick: (hit: PlaceHit) => void): FindList {
);
} catch (error) {
if (at === asked)
find.hint.textContent = `${t("DE_Reg_FindFail")} — ${error instanceof Error ? error.message : error}`;
say(`${t("DE_Reg_FindFail")} — ${error instanceof Error ? error.message : error}`);
}
}
// 고를 줄이 있으면 부품이 Enter 를 먼저 씀(고름) · 없으면 찾기 · 글을 고치면 옛 줄 걷음
find.search.addEventListener("input", () => find.setRows([]));
find.search.addEventListener("input", () => show([]));
find.search.addEventListener("keydown", (event) => {
if (event.key !== "Enter" || event.defaultPrevented || event.isComposing) return;
event.preventDefault();