fix(530-3): D03 화면 검증 흠 — 저장된 갈래 밝힘 · 움직인 끌기만 지점 옮김 · 횡단 꾸밈 · 진행 못 읽으면 알림

- 카드 고름 = 서버 이은 누가(저장 갈래) 위에 캐시 고름
- 지점 누름(손 떨림 안)은 끌기 아님 · 집은 자리 차 지킴
- 횡단 판 B05 RouteEdit 꾸밈 css · 끌기 끝나면 옛 횡단 비움
- 진행 요청 실패 = 알림 뒤 화면 되돌림(서버 일은 그대로)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-25 20:45:43 +09:00
co-authored by Claude Opus 5.5
parent 134515b9cb
commit 6db3a2f635
3 changed files with 46 additions and 11 deletions
+13 -5
View File
@@ -289,7 +289,8 @@ export function createPlanMap(events: PlanMapEvents): PlanMap {
};
// 지점 끌기 — 지도 옮기기보다 먼저 듣고 지점을 집었으면 옮기기에 안 넘김
let dragging: { index: number; id: number } | null = null;
// 집은 자리와 지점 가운데 차(px)를 지킴 · 손 떨림(CLICK_SLOP_PX) 안이면 끌기 아님(누름)
let dragging: { index: number; id: number; dx: number; dy: number; moved: boolean } | null = null;
let press: [number, number] | null = null;
canvas.addEventListener("pointerdown", (event) => {
press = [event.clientX, event.clientY];
@@ -297,7 +298,9 @@ export function createPlanMap(events: PlanMapEvents): PlanMap {
const index = nodeAt(...at(event));
if (index < 0) return;
event.stopImmediatePropagation();
dragging = { index, id: event.pointerId };
const [px, py] = at(event);
const [sx, sy] = toScreen(scene.nodes[index]);
dragging = { index, id: event.pointerId, dx: sx - px, dy: sy - py, moved: false };
canvas.setPointerCapture(event.pointerId);
canvas.style.cursor = "grabbing";
});
@@ -307,14 +310,19 @@ export function createPlanMap(events: PlanMapEvents): PlanMap {
canvas.style.cursor = nodeAt(...at(event)) >= 0 ? "grab" : "";
return;
}
events.onDrag(dragging.index, screenToMetric(meta, view, ...at(event)));
if (!press) return;
const far = Math.hypot(event.clientX - press[0], event.clientY - press[1]) > CLICK_SLOP_PX;
if (!dragging.moved && !far) return;
dragging.moved = true;
const [px, py] = at(event);
events.onDrag(dragging.index, screenToMetric(meta, view, px + dragging.dx, py + dragging.dy));
});
const endDrag = (event: PointerEvent): void => {
if (!dragging || event.pointerId !== dragging.id) return;
const index = dragging.index;
const { index, moved } = dragging;
dragging = null;
canvas.style.cursor = "";
events.onDragEnd(index);
if (moved) events.onDragEnd(index);
};
canvas.addEventListener("pointerup", endDrag);
canvas.addEventListener("pointercancel", endDrag);