화면 같이 줄어들게 수정

This commit is contained in:
kjs
2025-12-08 11:44:07 +09:00
parent cbe5cb4607
commit 09d2d7573d
2 changed files with 588 additions and 6 deletions

View File

@@ -216,7 +216,8 @@ function ScreenViewPage() {
initAutoFill();
}, [layout, user]);
// 캔버스 비율 조정 (사용자 화면에 맞게 자동 스케일) - 모바일에서는 비활성화
// 캔버스 비율 조정 (사용자 화면에 맞게 자동 스케일) - 초기 로딩 시에만 계산
// 브라우저 배율 조정 시 메뉴와 화면이 함께 축소/확대되도록 resize 이벤트는 감지하지 않음
useEffect(() => {
// 모바일 환경에서는 스케일 조정 비활성화 (반응형만 작동)
if (isMobile) {
@@ -262,13 +263,12 @@ function ScreenViewPage() {
}
};
// 초기 측정
// 초기 측정 (한 번만 실행)
const timer = setTimeout(updateScale, 100);
window.addEventListener("resize", updateScale);
// resize 이벤트는 감지하지 않음 - 브라우저 배율 조정 시 메뉴와 화면이 함께 변경되도록
return () => {
clearTimeout(timer);
window.removeEventListener("resize", updateScale);
};
}, [layout, isMobile]);
@@ -309,7 +309,7 @@ function ScreenViewPage() {
<TableOptionsProvider>
<div
ref={containerRef}
className="bg-background flex h-full w-full items-center justify-center overflow-auto"
className="bg-background h-full w-full overflow-auto p-3"
>
{/* 레이아웃 준비 중 로딩 표시 */}
{!layoutReady && (
@@ -334,7 +334,7 @@ function ScreenViewPage() {
maxHeight: `${screenHeight}px`,
flexShrink: 0,
transform: `scale(${scale})`,
transformOrigin: "center center",
transformOrigin: "top left",
overflow: "visible",
}}
>