diff --git a/B06_Section/B06_Section_UI_Cross_View.ts b/B06_Section/B06_Section_UI_Cross_View.ts index 58e03df5..8dda79df 100644 --- a/B06_Section/B06_Section_UI_Cross_View.ts +++ b/B06_Section/B06_Section_UI_Cross_View.ts @@ -23,6 +23,7 @@ import { sectionModeLabel, type RockBoundaryControl, } from "./B06_Section_UI_Cross_Design"; +import { showToast } from "@ui/ui_template_elements"; import { appendCulvertOverlay, computeCulvertLayout } from "./B06_Section_UI_Cross_Culvert"; import { buildStructurePanel } from "./B06_Section_UI_Cross_Structure_Panel"; import { attachZoomPan, buildZoomControls } from "./B06_Section_UI_Cross_View_Zoom"; @@ -488,9 +489,26 @@ export function createCrossSectionCard( culvertPipeLengthM = culvertLayout?.pipe.lengthM ?? null; // 요청한 이동량이 한계에 걸려 잘렸으면 그 값으로 되돌려 담는다 — 안 그러면 눌러도 // 안 움직이는데 창의 숫자만 계속 커진다(2026-08-21 사용자 지적). + // 잘린 순간에는 **왜 안 움직였는지 토스트로 알린다**(2026-08-22 사용자 요청 — + // 13+15.7처럼 자동 자리가 이미 안쪽 한계라 ◀가 그대로 먹히지 않는 경우). + // 조작 중(그 벽이 선택된 상태)일 때만 띄운다 — 리로드로 복원된 옛 세션 값에는 침묵. if (culvertLayout && revetOffset) { - revetOffset.syncShift(section.chainage_m, "inlet", culvertLayout.revetShift.inlet); - revetOffset.syncShift(section.chainage_m, "outlet", culvertLayout.revetShift.outlet); + for (const role of ["inlet", "outlet"] as const) { + const requested = revetOffset.shiftFor(section, role); + const applied = culvertLayout.revetShift[role]; + if (activeRevet === role && Math.abs(requested - applied) > 0.05) { + // 이동량 부호: + = 계류측 바깥. 요청이 적용보다 작으면 안쪽 요청이 잘린 것. + showToast( + L( + requested < applied + ? "B06_Cross_Revet_Limit_Inward" + : "B06_Cross_Revet_Limit_Outward", + ), + "info", + ); + } + revetOffset.syncShift(section.chainage_m, role, applied); + } } if (culvertLayout) { setRevetActive = appendCulvertOverlay( diff --git a/ui_template/ui_template_locale_b2.ts b/ui_template/ui_template_locale_b2.ts index 94322daa..6833d83d 100644 --- a/ui_template/ui_template_locale_b2.ts +++ b/ui_template/ui_template_locale_b2.ts @@ -250,6 +250,14 @@ export const ui_locales_b2 = { B06_Cross_Revet_Reset: ["기슭막이 자동 자리로 초기화", "Reset revetment to solved position"], B06_Cross_Revet_Inlet: ["유입 기슭막이", "Inlet revetment"], B06_Cross_Revet_Outlet: ["유출 기슭막이", "Outlet revetment"], + B06_Cross_Revet_Limit_Inward: [ + "기슭막이 안쪽 한계 — 더 당기면 성토 물매 1:1.2가 깨집니다(배관 최소 길이 자리).", + "Revetment inner limit — pulling further would break the 1:1.2 fill slope (minimum pipe length).", + ], + B06_Cross_Revet_Limit_Outward: [ + "기슭막이 바깥 한계 — 조정 범위를 벗어나 더 밀 수 없습니다.", + "Revetment outer limit — cannot push beyond the adjustment range.", + ], B06_Profile_View_Longitudinal: ["종단면도", "Longitudinal profile"], B06_Profile_View_Cross: ["횡단면도", "Cross sections"], B06_Profile_View_StationCount: ["횡단 측점", "Cross stations"],