From 8a2ed7df5882ae5ec5807391a4b2b6cb4596cef5 Mon Sep 17 00:00:00 2001 From: yschoi Date: Thu, 24 Jul 2025 21:16:26 +0900 Subject: [PATCH] =?UTF-8?q?=ED=95=98=EC=88=98=EC=B2=98=EB=A6=AC=EC=8B=9C?= =?UTF-8?q?=EC=84=A4=20=ED=8C=9D=EC=97=85=20=EC=82=AC=EC=9D=B4=EC=A6=88=20?= =?UTF-8?q?=EC=A1=B0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/app/map/newWindowPopup.tsx | 8 +++++++- apps/wr/app/map/newWindowPortal.tsx | 9 +++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/apps/wr/app/map/newWindowPopup.tsx b/apps/wr/app/map/newWindowPopup.tsx index faba4c81f..403401714 100644 --- a/apps/wr/app/map/newWindowPopup.tsx +++ b/apps/wr/app/map/newWindowPopup.tsx @@ -668,7 +668,13 @@ const NewWindowPopup: React.FC = ({ return ( viewMode == 'nothing' ? <> : - + {/* 체크된 레이어에 따른 조건부 렌더링 */} {renderConditionalContent()} diff --git a/apps/wr/app/map/newWindowPortal.tsx b/apps/wr/app/map/newWindowPortal.tsx index fc28495ad..6d650e3b7 100644 --- a/apps/wr/app/map/newWindowPortal.tsx +++ b/apps/wr/app/map/newWindowPortal.tsx @@ -27,9 +27,13 @@ interface NewWindowPortalProps { children: React.ReactNode; onClose: () => void; title?: string; + width?: number; + height?: number; + resizable?: string; + scrollbars?: string; } -const NewWindowPortal: React.FC = ({ children, onClose, title = "Detail" }) => { +const NewWindowPortal: React.FC = ({ children, onClose, title = "", width = 900, height = 800, resizable = "yes", scrollbars= "yes" }) => { const [container, setContainer] = useState(null); const newWindowRef = useRef(null); const onCloseRef = useRef(onClose); @@ -48,7 +52,8 @@ const NewWindowPortal: React.FC = ({ children, onClose, ti if (newWindowRef.current && !newWindowRef.current.closed) return; // 1. 새 창을 열고 참조를 저장합니다. - newWindowRef.current = window.open('', title, 'width=900,height=800,resizable=yes,scrollbars=yes'); + const popupOptions = `width=${width},height=${height},resizable=${resizable},scrollbars=${scrollbars}`; + newWindowRef.current = window.open('', title, popupOptions); if (newWindowRef.current) { newWindowRef.current.document.title = title;