Merge remote-tracking branch 'origin/sub_laptop_2' into main_laptop_1

This commit is contained in:
2026-10-18 17:21:10 +09:00
8 changed files with 84 additions and 48 deletions
+2
View File
@@ -51,6 +51,8 @@ export const STATE_REGISTRY = {
legacy: () => "b05-route-profile-collapsed",
},
"profile-height": { bucket: "pref", scope: "global", legacy: () => "b05-route-profile-height" },
/** B06 위 평면 겹침 패널 높이(436) */
"plan-peek-height": { bucket: "pref", scope: "global" },
/** 배수유역 판 접힘 — 기억 없음 = 닫힘(392-1 · 옛 "false" 기억 버림). */
"drainage-collapsed": { bucket: "pref", scope: "global", version: 2 },
"drainage-width": { bucket: "pref", scope: "global", legacy: () => "b05-route-drainage-width" },
+16 -3
View File
@@ -92,8 +92,9 @@
display: none;
}
/* 횡단 보기 위 평면 겹침 패널(요구 258 · 425 · `design_plan_peek`) — 카드 칸 위에 뜸(자리 안 차지) ·
닫히면 손잡이만 위 가운데 · 열면 가운데 칸 높이 45 % · 보기 · 팬 · 휠만이라 편집 도구는 감춤. */
/* 횡단 보기 위 평면 겹침 패널(요구 258 · 263 · `design_plan_peek`) — 카드 칸 위에 뜸(자리 안 차지) ·
닫히면 손잡이만 위 가운데 · 열면 처음 높이 32 %(160 px 아래로 안 감) · 아래 끝 끌어 조절 · 조작은 B05 평면 그대로라
단추 줄 · 안내 · 상태줄 등만 감춤. */
.design-plan-peek {
position: absolute;
z-index: 4;
@@ -105,7 +106,19 @@
}
.design-plan-peek.is-open {
height: 45%;
height: var(--design-plan-peek-height, max(32%, 160px)); /* 종단 판 펼친 B06 = 칸이 낮음 */
}
/* 높이 끌기 손잡이 = 패널 아래 끝(공용 세로 손잡이는 위 끝) · 열렸을 때만 */
.design-plan-peek > .ui-resizer {
top: auto;
bottom: -3px;
display: none;
pointer-events: auto;
}
.design-plan-peek.is-open > .ui-resizer {
display: block;
}
.design-plan-peek__body {
+17 -22
View File
@@ -4,11 +4,13 @@
* 그대로 옮겨 붙여 보여 줌(둘째 캔버스 없음 · 편집기는 페이지에 하나). 열 때 옮기고 · 닫을 때 ·
* 횡단 보기가 숨을 때 제자리(자리표 주석)로 돌림. 누름 · 휠은 캔버스에 붙어 함께 옴.
*
* 보기 · 가운데 버튼 팬 · 휠 확대만 — 왼쪽 · 오른쪽 누름(끌기 · 끼우기 · 지우기 · 재기)은 패널이
* 캡처에서 먼저 받아 캔버스로 안 보냄(편집은 B05 평면). 단추 줄 · 상태줄 등은 `design_page.css`.
* 조작 · 되돌리기 · 옵션 값은 B05 평면 그대로(같은 편집기 · 436) — 단추 줄 · 안내 · 상태줄 등만 감춤
* (`design_page.css`). 높이 = 아래 끝 끌기(화면 기억) · 열 때 · 크기 바뀔 때 내용 맞춤 없음.
* ========================================================================== */
import { createWorkflowPanelHandle } from "@ui/ui_template_overlay";
import { createPanelResizer } from "@ui/ui_template_resizer";
import { stateKey } from "../b_page_state";
import type { DesignPageHost } from "./design_page";
import type { DesignPageShared } from "./design_shared";
@@ -26,28 +28,20 @@ export function mountPlanPeek(
note.className = "design-plan-peek__note";
body.append(note);
const handle = createWorkflowPanelHandle("bottom", "up", "평면");
root.append(body, handle.root);
// 아래 끝 끌어 높이 — 120 px ~ 칸 높이 − 48 px(손잡이 자리) · 두 번 누름 = 처음 높이(32 %)
// 칸 = 패널 % 높이가 재는 자리(offsetParent) — `center` 는 높이 0
const resizer = createPanelResizer({
axis: "vertical",
target: root,
cssVar: "--design-plan-peek-height",
direction: 1,
min: 120,
max: () => (root.offsetParent?.clientHeight ?? 0) - 48,
storageKey: stateKey("plan-peek-height") ?? undefined,
});
root.append(body, resizer.root, handle.root);
center.append(root);
// 편집 몫 누름 막음 — 가운데 버튼(팬)만 통과 · 두 번 클릭(끼우기) · 오른쪽 클릭(지우기)도 막음.
// ponytail: 손가락 팬도 막힘(왼쪽 누름과 같은 단추 0) — 터치 기기에서 필요하면 pointerType 으로 가름.
body.addEventListener(
"pointerdown",
(event) => {
if (event.button !== 1) event.stopPropagation();
},
true,
);
for (const type of ["dblclick", "contextmenu"])
body.addEventListener(
type,
(event) => {
event.preventDefault();
event.stopPropagation();
},
true,
);
let opened = false;
let plan: HTMLElement | null = null;
let home: Comment | null = null;
@@ -66,6 +60,7 @@ export function mountPlanPeek(
const open = async (): Promise<void> => {
setOpen(true);
resizer.restore(); // 기억한 높이를 지금 칸에 맞춰 다시 씌움(세울 때는 칸 크기 0)
note.hidden = false;
note.textContent = "평면을 여는 중…";
await shared.ensureView("profile"); // B06 바로 열기 = 종단 보기를 숨긴 채 세움