fix(472-5 남음): 암선 · 암 경사 · B05 상단측 메모리 맵 걷음 · 노선 저장 뒤 옛 노선 칸 · hold 비움
- 암 경계 · 암 절토 경사 저장소(`B06_Section_UI_Page_Persist`) = 세션 칸이 주인 — 읽을 때마다 측점 열쇠 칸(`readCells`) · 고칠 때 지금 칸을 읽어 그 측점만 바꿔 씀(`putCell`) · 메모리 맵 · load · 갈아끼움 다시 읽기(keyedStores · reloadKeyedStores) 걷음 · ↶ 뒤 다음 조작이 되돌림을 덮던 흠(N5) 고침 - 저장 재료 = `offsets()` · `ratios()`(새 Map) · ↶ ↷ 가 rockb · cutslope 칸을 바꾸면 조정창과 같은 onRestore 로 카드 · 면적 다시 - B05 상단측 메모리 맵(uphillOverrides · load/saveUphillOverrides) 걷음 — 읽는 곳 없이 저장 뒤 비우기만 하던 사본 · 값 주인 = 세션 칸 `uphill` · 상단측 차례 = 기본 조각 그대로 - 노선 바뀐 [저장] 성공 뒤(페이지 다시 세운 뒤) 옛 노선 번호의 노선 범위 초안(`clearRouteDrafts`) · `route-draft-hold` 비움 · 넘김 규칙 그대로 · 같은 번호면 노선 칸 안 지움 · 실패면 그대로 - 시험 test_472_5r_rock_owner 7(옛 코드 빨강 5) · 옛 단언 고침(176_3 · 271 · 443 상단측 조각 · 344_3 저장소 load) - 위키 암선 · 암 경사 · ↶ ↷ 규칙 · 노선 저장 뒤 정리 줄 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -587,6 +587,13 @@ export function clearDrafts(projectId: string | null, routeId?: number | string
|
||||
namesInBucket("draft").forEach((name) => clearState(name, projectId, routeId));
|
||||
}
|
||||
|
||||
/** 한 노선 번호의 노선 범위 초안만 비움 — 노선 저장 뒤 옛 노선 칸(서버가 새 노선에 넘겼음 · 472-5). */
|
||||
export function clearRouteDrafts(projectId: string, routeId: number): void {
|
||||
namesInBucket("draft")
|
||||
.filter((name) => entryOf(name)?.scope === "route")
|
||||
.forEach((name) => clearState(name, projectId, routeId));
|
||||
}
|
||||
|
||||
/** 계산 결과를 통째로 버린다 — 입력(설계값·노선)이 바뀌어 다시 만들어야 할 때. */
|
||||
export function clearResults(projectId: string | null, routeId?: number | string | null): void {
|
||||
namesInBucket("result").forEach((name) => clearState(name, projectId, routeId));
|
||||
|
||||
@@ -39,7 +39,7 @@ import {
|
||||
type SavePartKey,
|
||||
type SaveStepKey,
|
||||
} from "./design_save_api";
|
||||
import { clearState, stateKey } from "../b_page_state";
|
||||
import { clearRouteDrafts, clearState, stateKey } from "../b_page_state";
|
||||
import {
|
||||
pendingRouteSave,
|
||||
rebuildAfterRouteSave,
|
||||
@@ -226,6 +226,9 @@ export async function saveDesign(
|
||||
if (confirm) showToast("노선을 저장했습니다 — 새 노선을 확인한 뒤 다시 [확정]하세요.", "info");
|
||||
else await ctx.done?.(false);
|
||||
await rebuildAfterRouteSave(ctx.projectId);
|
||||
// 옛 노선 칸 · 초안 전 hold = 서버가 새 노선에 넘겼음 — 쓰레기만 비움(넘김 규칙 그대로 · 세션 넘침 388-3)
|
||||
if (saved.route_id !== routeId) clearRouteDrafts(ctx.projectId, routeId);
|
||||
clearState("route-draft-hold", ctx.projectId);
|
||||
return true;
|
||||
} catch (error) {
|
||||
ctx.failed(oneBodyError(error), confirm);
|
||||
|
||||
@@ -536,8 +536,8 @@ export async function mountCrossView(
|
||||
reconcileDesigns: () => reconcileStaleDesigns({ force: true }),
|
||||
redraw: () => (host.visible() ? refreshDetailForStructures() : Promise.resolve()),
|
||||
patchSources: () => ({
|
||||
rockOffsets: rockStore.offsets,
|
||||
cutSlopeRatios: cutSlopeStore.ratios,
|
||||
rockOffsets: rockStore.offsets(),
|
||||
cutSlopeRatios: cutSlopeStore.ratios(),
|
||||
stationWidths: stationControls.widths(),
|
||||
inletStructures: stationControls.inletStructures(),
|
||||
basinAdjustments: stationControls.basinAdjustments(),
|
||||
@@ -631,8 +631,6 @@ export async function mountCrossView(
|
||||
leaveForDashboard();
|
||||
return;
|
||||
}
|
||||
rockStore.load();
|
||||
cutSlopeStore.load();
|
||||
stationControls.load();
|
||||
// 구조물 배치 데이터(타입·정본·관 지점) — 카드 로드와 병행, 화면을 잠그지 않는다. 숨긴 채
|
||||
// 섰으면(종단 보기 [확정]) 한 벌 폼은 종단 보기 몫이라 싣지 않는다 — 보일 때 싣는다.
|
||||
|
||||
@@ -78,8 +78,6 @@ import { STRUCTURE_ROUTE_DRIFT_MAX_M } from "../../common_util/common_util_route
|
||||
import {
|
||||
DEFAULT_ROAD_WIDTHS,
|
||||
fetchRoadWidths,
|
||||
loadUphillOverrides,
|
||||
saveUphillOverrides,
|
||||
toGradeClass,
|
||||
} from "../../B05_Profile/B05_Profile_UI_Page_Helpers";
|
||||
import { createProfileSections, type ProfileViewState } from "./design_view_profile_sections";
|
||||
@@ -228,11 +226,6 @@ export async function mountProfileView(
|
||||
// 선택 동기화 재진입 가드(3D↔그래프↔사이드바 상호 갱신의 무한 재귀 차단).
|
||||
let selectionSyncing = false;
|
||||
|
||||
/* ── 측점 상단측(=측구 방향) 사용자 변경분 ─────────────────────────────
|
||||
* solve가 자동 판정한 uphill_side를 사용자가 바꾼 값. 세션에 보관했다가
|
||||
* 저장 시 uphill_overrides로 백엔드/DB(종단 정본)에 병합한다(3D 구슬 입력은 176-3 에서 지움). */
|
||||
const uphillOverrides = loadUphillOverrides(activeProjectId);
|
||||
|
||||
const { syncIrregularSelection, selectStationOfPipe } = createSelectionSync({
|
||||
stations: () => bridge.irregularStations(),
|
||||
isSyncing: () => selectionSyncing,
|
||||
@@ -415,8 +408,6 @@ export async function mountProfileView(
|
||||
panel: () => panel,
|
||||
profilePanel: () => profilePanel,
|
||||
bridge: () => bridge,
|
||||
uphillOverrides,
|
||||
persistUphillOverrides: () => saveUphillOverrides(activeProjectId, uphillOverrides),
|
||||
loadLatest,
|
||||
renderLatest,
|
||||
restoreSections,
|
||||
@@ -424,7 +415,6 @@ export async function mountProfileView(
|
||||
// [저장] · [확정] · [초기화]에 보태는 종단 보기 몫 — 한 벌이 두 보기 몫을 모아 보낸다.
|
||||
bindDesignView(shared, "profile", {
|
||||
save: profileSaveParts(actionContext),
|
||||
onReset: () => uphillOverrides.clear(),
|
||||
// 계산 묶음(페이지 몫 · 365-1) 알림 중 종단 보기 몫 — 3D 「낡음」 · 관 · 구조물 따라감
|
||||
pipeline: {
|
||||
onCorridorStale: () => sections.setCorridorPending(true),
|
||||
|
||||
Reference in New Issue
Block a user