fix(451 B06 새로고침 hold): 되돌림 측점 같음 판정 = 초안 얹기 다시 뒤 측점으로 (440-4)
- 초안 둔 채 새로고침 뒤 버림 기록이 saved-diff 로 남던 것 — 다시 얹은 뒤 견줌 · saved Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -345,10 +345,6 @@ export async function restoreSectionDetail(
|
||||
const current = cache.get(key);
|
||||
if (!current) return null;
|
||||
const saved = renewed.get(hold.detail) ?? hold.detail; // 그 사이 서버 판이 바뀌었으면 새 판(433-16)
|
||||
const sections = saved.cross_sections;
|
||||
const same =
|
||||
sections.length === stations.length &&
|
||||
stations.every((station, i) => Math.abs(station.chainageM - sections[i].chainage_m) < 1e-3);
|
||||
const oldKeys = registeredKeys(
|
||||
projectId,
|
||||
routeId,
|
||||
@@ -371,6 +367,10 @@ export async function restoreSectionDetail(
|
||||
await withDraftShapes(saved, projectId);
|
||||
withStructureAreas(saved);
|
||||
if (cache.get(key) !== saved) return null; // 그 사이 다른 갈아끼움 · 새로 받음
|
||||
const sections = saved.cross_sections; // 다시 얹은 뒤 측점(440-4)
|
||||
const same =
|
||||
sections.length === stations.length &&
|
||||
stations.every((station, i) => Math.abs(station.chainageM - sections[i].chainage_m) < 1e-3);
|
||||
emitSwap(saved, moves);
|
||||
listeners.get(key)?.forEach((fn) => fn(saved, moves));
|
||||
return { detail: saved, same };
|
||||
|
||||
Reference in New Issue
Block a user