diff --git a/A00_Common/design/design_pipeline_page.ts b/A00_Common/design/design_pipeline_page.ts index 5469ee5b7..770df3f6c 100644 --- a/A00_Common/design/design_pipeline_page.ts +++ b/A00_Common/design/design_pipeline_page.ts @@ -123,6 +123,9 @@ export interface PagePipelineOptions { /** 노선 조작 뒤 follow 가 가게 관 · 구조물을 다시 씀(목록 · 알약 다시) — `far` = 새 노선에서 * `STRUCTURE_ROUTE_DRIFT_MAX_M` 넘게 먼 구조물 수(초안을 버려 되돌렸으면 0). */ onFacilitiesFollowed?: (far: number) => void; + /** 새 노선 상세에 관 · 구조물 측점 폐회로 면적을 얹음(상세 가게 · 서버와 같은 얹기 · 349-0j) — 화면 + * 부품 계산이라 페이지가 넘김(묶음은 안 끌어옴). */ + structureAreas?: (detail: SectionDetailResponse) => void; /** 노선 초안을 버림(349-0k) — 초안 전 상세(`saved` · 없으면 null)로 되돌림 · `stations` = 저장 노선 측점 · * 돌려주는 값 = 되돌림 길 한 단어(묶음 기록 `restoreWhy`). 끝난 뒤 종단도가 저장 기준으로 돌아옴. */ onDraftDropped?: ( @@ -387,6 +390,7 @@ function createPagePipeline( ) : null; if (shown) drafted.add(shown); + if (shown) options.structureAreas?.(shown); // 관 · 구조물이 선 측점 = 폐회로 면적(349-0j) if (event.stage === "cross") return void (draft && link.redraw?.()); const base = pipe.output("planline"); const edits = (pipe.input("alignment") as AlignmentEdits | null) ?? emptyEdits(); diff --git a/A00_Common/design/design_view_profile.ts b/A00_Common/design/design_view_profile.ts index 25a104ac4..debe4fbce 100644 --- a/A00_Common/design/design_view_profile.ts +++ b/A00_Common/design/design_view_profile.ts @@ -48,6 +48,10 @@ import { rememberStandardDefaults, } from "../../B06_Section/B06_Section_UI_Standard_Panel"; import { fetchSectionContext } from "../../B06_Section/B06_Section_Api_Fetch"; +import { + applyStructureAreaRows, + structureAreaRows, +} from "../../B06_Section/B06_Section_Structure_Layouts"; import { invalidateSectionDetail, restoreSectionDetail, @@ -528,6 +532,8 @@ export async function mountProfileView( stationIntervalM: panel.values().stationInterval ?? undefined, onCorridorStale: () => sections.setCorridorPending(true), onFacilitiesFollowed: followFacilities, + structureAreas: ({ cross_sections: rows }) => + applyStructureAreaRows(rows, structureAreaRows(rows)), // 초안을 버림 — 초안 전 상세 그대로(349-0k) · 그 상세가 없거나(초안 둔 채 새로고침) 측점이 다르면 갈아끼움 onDraftDropped: async (routeId, saved, stations) => { const back = diff --git a/resources/tester/helper_349_0l_undo_draw.cjs b/resources/tester/helper_349_0l_undo_draw.cjs index 9d9f49a8a..7195522ff 100644 --- a/resources/tester/helper_349_0l_undo_draw.cjs +++ b/resources/tester/helper_349_0l_undo_draw.cjs @@ -204,6 +204,7 @@ const pageMod = load("A00_Common", "design", "design_pipeline_page.ts"); const storeMod = load("A00_Common", "design", "design_store.ts"); const sectionStore = load("B06_Section", "B06_Section_Section_Store.ts"); const common = load("B06_Section", "B06_Section_UI_Section_Common.ts"); +const layouts = load("B06_Section", "B06_Section_Structure_Layouts.ts"); const profileData = load("B05_Profile", "logic", "B05_Profile_UI_Profile_Data.ts"); const alignmentMod = load("B05_Profile", "logic", "B05_Profile_UI_Profile_Alignment.ts"); const baseMod = load("A00_Common", "design", "design_profile_base.ts"); @@ -290,6 +291,8 @@ async function run() { const live = () => sectionStore.loadSectionDetail(P, R); pageMod.routeDraftBridge(P, profile, { stationIntervalM: job.interval, + structureAreas: ({ cross_sections: rows }) => + layouts.applyStructureAreaRows(rows, layouts.structureAreaRows(rows)), // `design_view_profile` 의 onDraftDropped 그대로 onDraftDropped: async (routeId, saved, stations) => { const back = saved && (await sectionStore.restoreSectionDetail(P, routeId, saved, stations));