diff --git a/src/app/api/image/canvas/route.js b/src/app/api/image/canvas/route.js
index 9f4e3f52..b96e079f 100644
--- a/src/app/api/image/canvas/route.js
+++ b/src/app/api/image/canvas/route.js
@@ -95,16 +95,11 @@ const resizeImage = async (image) => {
const scaleY = targetImageHeight / image.bitmap.height
let scale = Math.min(scaleX, scaleY) // 비율 유지하면서 최대한 크게
- // scale 저장 (나중에 전체 확대에 사용)
- const originalScale = scale
-
let finalWidth = Math.round(image.bitmap.width * scale)
let finalHeight = Math.round(image.bitmap.height * scale)
- if (scale >= 0.6) {
- // 실제 리사이즈 실행
- image.resize({ w: finalWidth, h: finalHeight })
- }
+ // 항상 리사이즈 실행 (scale >= 0.6 조건 제거)
+ image.resize({ w: finalWidth, h: finalHeight })
//배경 이미지를 생성
const mixedImage = new Jimp({ width: convertStandardWidth, height: convertStandardHeight, color: 0xffffffff })
@@ -119,14 +114,7 @@ const resizeImage = async (image) => {
opacityDest: 1,
})
- // scale이 0.8 이하인 경우 완성된 이미지를 전체적으로 확대
- if (originalScale <= 0.8) {
- const enlargeRatio = 1.5 // 50% 확대
- const newWidth = Math.round(mixedImage.bitmap.width * enlargeRatio)
- const newHeight = Math.round(mixedImage.bitmap.height * enlargeRatio)
-
- mixedImage.resize({ w: newWidth, h: newHeight })
- }
+ // 1.5x 확대 로직 제거 - 이미지가 템플릿 크기를 초과하지 않도록 함
return mixedImage
}
diff --git a/src/common/common.js b/src/common/common.js
index 76632014..6ecc08fc 100644
--- a/src/common/common.js
+++ b/src/common/common.js
@@ -222,6 +222,9 @@ export const SAVE_KEY = [
'skeletonLines',
'skeleton',
'viewportTransform',
+ 'outerLineFix',
+ 'adjustRoofLines',
+ 'northModuleYn',
]
export const OBJECT_PROTOTYPE = [fabric.Line.prototype, fabric.Polygon.prototype, fabric.Triangle.prototype, fabric.Group.prototype]
diff --git a/src/components/Main.jsx b/src/components/Main.jsx
index 9afadca7..ad7dd3d3 100644
--- a/src/components/Main.jsx
+++ b/src/components/Main.jsx
@@ -18,8 +18,9 @@ import Config from '@/config/config.export'
export default function MainPage() {
const [sessionState, setSessionState] = useRecoilState(sessionStore)
- const [chagePasswordPopOpen, setChagePasswordPopOpen] = useState(false)
-
+ const [changePasswordPopOpen, setChangePasswordPopOpen] = useState(false)
+ // 데이터 확인 완료 여부 상태 추가
+ const [isSessionLoaded, setIsSessionLoaded] = useState(false)
const router = useRouter()
const { getMessage } = useMessage()
@@ -52,6 +53,14 @@ export default function MainPage() {
}
}
+ useEffect(() => {
+ if (isObjectNotEmpty(sessionState)) {
+ if (sessionState?.pwdInitYn !== 'Y') {
+ setChangePasswordPopOpen(true)
+ }
+ }
+ }, [sessionState])
+
// 라디오 변경 이벤트
const handleOnChangeRadio = (e) => {
setSearchRadioType(e.target.value)
@@ -77,7 +86,7 @@ export default function MainPage() {
useEffect(() => {
if (isObjectNotEmpty(sessionState)) {
if (sessionState?.pwdInitYn !== 'Y') {
- setChagePasswordPopOpen(true)
+ setChangePasswordPopOpen(true)
}
}
}, [sessionState])
@@ -86,10 +95,25 @@ export default function MainPage() {
const [open, setOpen] = useState(false)
const [modalNoticeNo, setModalNoticeNo] = useState('')
+ useEffect(() => {
+ if (isObjectNotEmpty(sessionState)) {
+ if (sessionState?.pwdInitYn !== 'Y') {
+ setChangePasswordPopOpen(true)
+ } else {
+ // pwdInitYn이 'Y'라면 팝업을 닫음 (false)
+ setChangePasswordPopOpen(false)
+ }
+ }
+ }, [sessionState])
+
+ //if (!isSessionLoaded) return null
+
return (
<>
{open &&
{selected}
-