Merge remote-tracking branch 'origin/sub_laptop_2' into main_laptop_1
This commit is contained in:
@@ -13,7 +13,7 @@ import type { DesignProfile } from "./design_profile";
|
||||
/** 메인 창 문서 · 창에 걸린 듣기가 받아야 할 새 창 이벤트. */
|
||||
const FORWARD_TYPES = ["keydown", "keyup", "pointerdown", "pointerup", "pointercancel"];
|
||||
|
||||
/** 종단 도구줄 [초기화] 왼쪽 단추(`toolLead`)를 [새 창] 단추로 꾸민다 — 두 보기가 같은 한 벌을 쓴다. */
|
||||
/** 종단 도구줄 [초기화] 왼쪽 단추(`toolLead`)를 [창 분할] 단추로 꾸민다 — 두 보기가 같은 한 벌을 쓴다. */
|
||||
export function attachProfilePopout(
|
||||
profile: DesignProfile,
|
||||
slot: HTMLElement,
|
||||
@@ -24,14 +24,14 @@ export function attachProfilePopout(
|
||||
|
||||
button.type = "button";
|
||||
button.className = "ui-btn ui-btn--ghost b05-route-profile__popout";
|
||||
button.textContent = "새 창";
|
||||
button.title = "종단 하단 패널을 브라우저 새 창으로 띄움";
|
||||
button.textContent = "창 분할";
|
||||
button.title = "종단 하단 패널을 별도 창으로 분할 · 다시 누르면 결합";
|
||||
button.addEventListener("click", () => (popup && !popup.closed ? closePopup() : open()));
|
||||
|
||||
const restore = (): void => {
|
||||
if (!root.classList.contains("is-popout")) return;
|
||||
root.classList.remove("is-popout");
|
||||
button.textContent = "새 창";
|
||||
button.textContent = "창 분할";
|
||||
slot.append(root);
|
||||
popup = null;
|
||||
requestAnimationFrame(profile.redraw);
|
||||
@@ -69,7 +69,7 @@ export function attachProfilePopout(
|
||||
doc.body.className = document.body.className;
|
||||
doc.body.style.cssText = `margin:0;height:100dvh;overflow:hidden;background:${getComputedStyle(document.body).backgroundColor}`;
|
||||
root.classList.add("is-popout");
|
||||
button.textContent = "제자리로";
|
||||
button.textContent = "창 결합";
|
||||
doc.body.replaceChildren(root);
|
||||
|
||||
// 새 창 키 · 포인터를 메인 문서로 — 대상은 새 창 요소 그대로(입력칸 판정 · 메뉴 안 판정).
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
- 282-1 [배수유역도] 켬끔 단추 · 켬끔 값(`drainage-visible`) 없음 · 옛 값 false 여도 판 · 손잡이 보임
|
||||
- 282-2 [새 창] = 도구 묶음 맨 앞([초기화] 바로 왼쪽) · 다시 그려도 그 자리 · 열림 · 닫힘 동작 그대로
|
||||
- 285-1 단추 글 = [창 분할] · 열린 동안 [창 결합](요구 179-2)
|
||||
`helper_282_1_profile_toolbar.cjs` 가 진짜 TS 를 가짜 DOM 위에서 돌림.
|
||||
"""
|
||||
|
||||
@@ -51,16 +52,16 @@ def test_배수유역도_단추_코드_없음():
|
||||
|
||||
|
||||
def test_새_창_초기화_바로_앞_다시_그려도(out):
|
||||
assert out["first"] == ["새 창", *TOOLS]
|
||||
assert out["again"] == ["새 창", *TOOLS]
|
||||
assert out["first"] == ["창 분할", *TOOLS]
|
||||
assert out["again"] == ["창 분할", *TOOLS]
|
||||
assert "b05-route-profile__popout" in out["buttonClass"]
|
||||
|
||||
|
||||
def test_새_창_열림_닫힘(out):
|
||||
assert out["opened"] == {"text": "제자리로", "inPopup": True}
|
||||
assert out["openedRender"] == ["제자리로", *TOOLS]
|
||||
assert out["closed"] == {"text": "새 창", "inSlot": True, "popupClosed": True}
|
||||
assert out["closedRender"] == ["새 창", *TOOLS]
|
||||
assert out["opened"] == {"text": "창 결합", "inPopup": True}
|
||||
assert out["openedRender"] == ["창 결합", *TOOLS]
|
||||
assert out["closed"] == {"text": "창 분할", "inSlot": True, "popupClosed": True}
|
||||
assert out["closedRender"] == ["창 분할", *TOOLS]
|
||||
|
||||
|
||||
def test_옛_값_false_여도_판_손잡이_보임(out):
|
||||
|
||||
Reference in New Issue
Block a user