From c71468851d5509b855fe71626333953b11bc8c8c Mon Sep 17 00:00:00 2001 From: yjnoh Date: Wed, 23 Oct 2024 15:30:30 +0900 Subject: [PATCH] =?UTF-8?q?=EC=98=B5=EC=85=982=20-=20=EC=BA=94=EB=B2=84?= =?UTF-8?q?=EC=8A=A4=20=EC=82=AC=EC=9D=B4=EC=A6=88=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modal/setting01/planSize/PlanSizeSetting.jsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/floor-plan/modal/setting01/planSize/PlanSizeSetting.jsx b/src/components/floor-plan/modal/setting01/planSize/PlanSizeSetting.jsx index 8802127e..18a92bf9 100644 --- a/src/components/floor-plan/modal/setting01/planSize/PlanSizeSetting.jsx +++ b/src/components/floor-plan/modal/setting01/planSize/PlanSizeSetting.jsx @@ -1,7 +1,9 @@ -import WithDraggable from '@/components/common/draggable/WithDraggable' -import { usePopup } from '@/hooks/usePopup' -import { useMessage } from '@/hooks/useMessage' import { useState } from 'react' +import { useRecoilValue } from 'recoil' +import { useMessage } from '@/hooks/useMessage' +import { usePopup } from '@/hooks/usePopup' +import WithDraggable from '@/components/common/draggable/WithDraggable' +import { canvasState } from '@/store/canvasAtom' export default function PlanSizeSetting(props) { const { horizon, setHorizon, vertical, setVertical, id, pos = { x: 985, y: 180 }, setIsShow } = props @@ -9,6 +11,7 @@ export default function PlanSizeSetting(props) { const { getMessage } = useMessage() const [originHorizon, setOriginHorizon] = useState(horizon) const [originVertical, setOriginVertical] = useState(vertical) + const canvas = useRecoilValue(canvasState) return ( @@ -55,6 +58,9 @@ export default function PlanSizeSetting(props) { setVertical(originVertical) setIsShow(false) closePopup(id) + canvas.setWidth(originHorizon) + canvas.setHeight(originVertical) + canvas.renderAll() }} > {getMessage('modal.common.save')}