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')}