Merge remote-tracking branches 'origin/main_laptop_1', 'origin/sub_laptop_4', 'origin/sub_laptop_5' and 'origin/sub_laptop_6' into sub_laptop_2
This commit is contained in:
@@ -64,6 +64,8 @@ export interface CadSaveResult<D, Q> {
|
||||
export interface CadHostOptions {
|
||||
/** iframe 제목(접근성). */
|
||||
title: string;
|
||||
/** 처음부터 캔버스만(`?bare`) — 도면이 오기 전에도 리본 · 패널을 안 그림(522-2). */
|
||||
bare?: boolean;
|
||||
/** CAD 편집 통지 — dirty 는 미저장 편집이 있는가. */
|
||||
onChanged?: (dirty: boolean) => void;
|
||||
/** CAD 리본의 DXF·DWG 내보내기 단추. */
|
||||
@@ -142,7 +144,7 @@ export function createCadHost<D extends CadHostDrawing, M = unknown, Q = unknown
|
||||
element.className = "cad-host";
|
||||
const frame = document.createElement("iframe");
|
||||
frame.className = "cad-host__frame";
|
||||
frame.src = CAD_APP_URL;
|
||||
frame.src = options.bare ? `${CAD_APP_URL}?bare` : CAD_APP_URL;
|
||||
frame.title = options.title;
|
||||
// CAD 안(리본 · 패널)도 브라우저 기본 메뉴를 막음 — 부모 문서의 듣기는 iframe 에 안 닿음(계획서 39-9a)
|
||||
frame.addEventListener("load", () => {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
* ========================================================================== */
|
||||
|
||||
import { el } from "./ui_template_elements_base";
|
||||
import { createProgressCircle, type ProgressCircleHandle } from "./ui_template_progress";
|
||||
|
||||
// 차트·기본 스타일 조각은 파일이 700줄을 넘어 떼어냈다(2026-09-04).
|
||||
// 여기서 그대로 다시 내보내 호출부의 import 경로는 불변이다.
|
||||
@@ -225,6 +226,7 @@ export function createTag(label: string, variant: TagVariant = "neutral"): HTMLS
|
||||
|
||||
let overlayEl: HTMLDivElement | null = null;
|
||||
let overlayCount = 0;
|
||||
let overlayProgress: ProgressCircleHandle | null = null;
|
||||
|
||||
function ensureOverlay(): HTMLDivElement {
|
||||
if (overlayEl) return overlayEl;
|
||||
@@ -248,10 +250,25 @@ export function showLoadingOverlay(): void {
|
||||
export function hideLoadingOverlay(): void {
|
||||
overlayCount = Math.max(0, overlayCount - 1);
|
||||
if (overlayCount === 0 && overlayEl) {
|
||||
overlayEl.classList.remove("is-active");
|
||||
overlayEl.classList.remove("is-active", "ui-overlay--progress");
|
||||
overlayProgress?.remove();
|
||||
overlayProgress = null;
|
||||
}
|
||||
}
|
||||
|
||||
/** 띄운 잠금판에 진행 원 · 글(520-3) — 스피너 자리 · 모든 참조가 풀리면 함께 걷힘.
|
||||
* ratio null = 진행률 미상(회전만). 잠금판이 안 떠 있으면 아무것도 안 함. */
|
||||
export function setLoadingOverlayProgress(ratio: number | null, label?: string): void {
|
||||
if (overlayCount === 0) return;
|
||||
const overlay = ensureOverlay();
|
||||
if (!overlayProgress) {
|
||||
overlayProgress = createProgressCircle();
|
||||
overlay.append(overlayProgress.root);
|
||||
overlay.classList.add("ui-overlay--progress");
|
||||
}
|
||||
overlayProgress.set(ratio, label);
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* 6. 토스트 알림 (Toast) — 성공/에러 배너
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
@@ -204,6 +204,9 @@ const BASE_CSS = `
|
||||
z-index: var(--z-overlay);
|
||||
}
|
||||
.ui-overlay.is-active { display: flex; }
|
||||
/* 진행 잠금판(520-3) — 스피너 대신 진행 원 · 단계 글 */
|
||||
.ui-overlay--progress > .ui-spinner { display: none; }
|
||||
.ui-overlay .ui-progress-circle__label { max-width: 40ch; }
|
||||
.ui-spinner {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
|
||||
Reference in New Issue
Block a user