diff --git a/B06_Section/B06_Section_UI_Cross_View.ts b/B06_Section/B06_Section_UI_Cross_View.ts index fe7595aa..f3d3f42c 100644 --- a/B06_Section/B06_Section_UI_Cross_View.ts +++ b/B06_Section/B06_Section_UI_Cross_View.ts @@ -638,6 +638,7 @@ export function createCrossSectionCard( adjustOf, outwardOf, heightOfWall, + drawnWallKeys: () => [...culvertWallSpecs.keys()], formOfWall, appliedD: () => culvertAppliedD, pipeLengthM: () => culvertPipeLengthM, diff --git a/B06_Section/B06_Section_UI_Cross_View_Structure.ts b/B06_Section/B06_Section_UI_Cross_View_Structure.ts index 3aff0cb9..d00ff419 100644 --- a/B06_Section/B06_Section_UI_Cross_View_Structure.ts +++ b/B06_Section/B06_Section_UI_Cross_View_Structure.ts @@ -59,6 +59,8 @@ export interface StructurePanelContext { /** 화면 좌(◀) 방향을 벽 기준 부호로 환산한다. */ outwardOf: (key: RevetKey) => number; heightOfWall: (key: RevetKey) => number; + /** 지금 이 카드가 그린 벽 목록 — 연동 해제 때 높이를 굳히는 데 쓴다(2026-09-06). */ + drawnWallKeys: () => RevetKey[]; formOfWall: (key: RevetKey) => string; /** 마지막 계산의 실제 적용 d(상하) — d 미지정 벽의 ▲▼ 시작값. */ appliedD: () => Map; @@ -186,7 +188,20 @@ export function structurePanelDeps(ctx: StructurePanelContext): StructurePanelDe }, linkState: () => ctx.isLinked ? { linked: ctx.revetLink?.linkedFor(ctx.section) ?? true } : null, - setLinked: (linked) => ctx.revetLink?.setLinked(ctx.section.chainage_m, linked), + setLinked: (linked) => { + // 연동을 **푸는 순간** 지금 그려진 높이를 이 측점 값으로 굳힌다(2026-09-06 사용자 + // 지시). 예전에는 위치(4축)만 갈리고 높이는 소유 측점 값을 계속 따라가, 소유 + // 측점 높이를 바꾸면 푼 측점까지 같이 움직였다. 굳혀 두면 값이 튀지 않으면서 + // 이후에는 따로 논다. 단 수·형태는 소유 측점을 그대로 따른다(2026-08-30 확정 유지). + if (!linked) { + ctx.drawnWallKeys().forEach((key) => { + if (ctx.adjustOf(key).h !== null && ctx.adjustOf(key).h !== undefined) return; + const height = ctx.heightOfWall(key); + if (height > 0) ctx.revetOffset?.update(ctx.section.chainage_m, key, { h: height }); + }); + } + ctx.revetLink?.setLinked(ctx.section.chainage_m, linked); + }, followGrade: () => ctx.revetLink?.followGradeFor(ctx.structureSpan?.ownerOf(ctx.section) ?? ctx.section) ?? true, setFollowGrade: (follow) => {