main_laptop_1 -> main byeonghap (4 hwangyeong 585 commits) #12
@@ -224,8 +224,16 @@ function markDirty(projectId: string, routeId: number): void {
|
||||
export async function saveCorridorIfDirty(projectId: string, routeId: number): Promise<void> {
|
||||
const entry = cache.get(keyOf(projectId, routeId));
|
||||
if (!entry || !entry.dirty) return;
|
||||
const ok = await putStored(projectId, routeId, serialize(entry.build, entry.hash));
|
||||
if (ok) entry.dirty = false;
|
||||
const envelope = serialize(entry.build, entry.hash);
|
||||
const ok = await putStored(projectId, routeId, envelope);
|
||||
if (!ok) return;
|
||||
entry.dirty = false;
|
||||
// 방금 올린 것을 **보관함에도** 담는다(2026-09-06) — 그러지 않으면 다음 진입이 열쇠가
|
||||
// 바뀐 주소로 한 번 더 받아 온다. 담아 두면 네트워크 없이 선다.
|
||||
const url = `${corridorUrlPrefix(projectId, routeId)}?hash=${encodeURIComponent(entry.hash)}`;
|
||||
const bytes = new TextEncoder().encode(JSON.stringify(envelope)).buffer as ArrayBuffer;
|
||||
await purgeAssetsWithPrefix(projectId, corridorUrlPrefix(projectId, routeId));
|
||||
await writeCachedBytes(projectId, url, bytes);
|
||||
}
|
||||
|
||||
/** Page 훅 — 현재 종횡단 정본 그대로 코리도를 확보해 뷰어에 반영(실패 시 제거).
|
||||
|
||||
@@ -322,6 +322,10 @@ export async function renderB05Route(root: HTMLElement): Promise<void> {
|
||||
);
|
||||
// 측점 바·라벨·램프도 계획고를 따라 움직여야 한다(2026-08-23 지적 ③).
|
||||
renderStationLines(currentSectionDetail);
|
||||
// 만든 것을 **바로 올려 둔다**(2026-09-06) — 예전에는 B05→B06 이동 때만 올려서,
|
||||
// 누른 뒤 새로고침하면 저장본이 낡은 채라 다음 사람이 또 만들어야 했다.
|
||||
// 브라우저 보관함이 생긴 지금은 올려 두면 다음 진입이 네트워크 없이 선다.
|
||||
void saveCorridorIfDirty(activeProjectId, latest.route.id);
|
||||
},
|
||||
onMovePoint: viewer.beginMoveSelected,
|
||||
onDeletePoint: viewer.markers.deleteSelected,
|
||||
|
||||
Reference in New Issue
Block a user