물재이용 지도 팝업 창 수정

This commit is contained in:
leedj312
2025-08-12 17:31:57 +09:00
parent 667dc58847
commit 2edb56284e
7 changed files with 37 additions and 26 deletions
-1
View File
@@ -173,7 +173,6 @@ export const getCityOrSgg = (ref: RefObject<ReturnType>) => {
export const safeDate = (value: any): Date | undefined => {
const date = new Date(value);
console.log(' date ', date)
return isNaN(date.getTime()) ? undefined : date;
};
+4 -3
View File
@@ -128,15 +128,16 @@ export function featurePopUpOpen(layerNm:string,featureCd:string,popupDetailRef)
const url = `/mapFeaturePopup?layerNm=${encodeURIComponent(String(layerNm))}&featureCd=${encodeURIComponent(featureCd)} `;
const width =
String(layerNm) === "tb_wr_bdst_ruse_fclt"
? Math.floor(window.innerWidth * 0.8)
? Math.floor(window.innerWidth * 0.6)
: Math.floor(window.innerWidth * 0.4); // 화면 폭의 40%
const height =
String(layerNm) === "tb_wr_bdst_ruse_fclt"
? Math.floor(window.innerHeight - 150)
? Math.floor(window.innerHeight - 100)
: Math.floor(window.innerHeight - 450); // 150px 여백 확보; // calc(100% - 70px)
const left = (window.screen.availWidth - width) / 2;
const top = (window.screen.availHeight - height) / 2;
const popupOptions = `width=${width},height=${height},left=${left},top=${top},resizable=yes,scrollbars=yes`;
const popupOptions = `width=${width},height=${height},left=${left},top=${top},resizable=yes,scrollbars=yes `;
popupDetailRef.current = window.open(
url,
"지도 시설 상세정보 팝업",