fix(M02): 작도 영역 창을 단추 바로 아래 오른쪽 맞춤으로 · 창 밖으로 안 나가게
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PxvYb5ufV1kWdBvZbpDfu6
This commit is contained in:
@@ -73,3 +73,14 @@
|
||||
margin-left: auto;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.m02-pop {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.m02-pop > .ui-modal {
|
||||
position: absolute;
|
||||
width: 23rem;
|
||||
max-width: calc(100vw - 16px);
|
||||
box-shadow: 0 4px 16px rgb(0 0 0 / 25%);
|
||||
}
|
||||
|
||||
@@ -150,8 +150,17 @@ export function mountDrawingTemplate(
|
||||
title: "작도 영역",
|
||||
closeLabel: "닫기",
|
||||
dialogClass: "m02-modal",
|
||||
backdropClass: "m02-pop",
|
||||
mount: (body) => body.append(areaForm),
|
||||
});
|
||||
// 단추 바로 아래 · 오른쪽 맞춤 · 화면 밖으로 안 나가게
|
||||
const dialog = document.querySelector<HTMLElement>(".m02-pop > .ui-modal");
|
||||
if (!dialog) return;
|
||||
const at = areaButton.getBoundingClientRect();
|
||||
const width = dialog.offsetWidth;
|
||||
dialog.style.top = `${at.bottom + 4}px`;
|
||||
dialog.style.left = `${Math.max(8, Math.min(at.right - width, innerWidth - width - 8))}px`;
|
||||
dialog.style.maxHeight = `${innerHeight - at.bottom - 12}px`;
|
||||
});
|
||||
|
||||
// CAD 안 💾 · Ctrl+S — 양식 파일은 페이지 [저장] 만 쓴다. 저장 중 또 눌러도 한 번만 부른다.
|
||||
|
||||
Reference in New Issue
Block a user