diff --git a/src/components/common/color-picker/ColorPickerModal.jsx b/src/components/common/color-picker/ColorPickerModal.jsx index add20a7e..9d0074e0 100644 --- a/src/components/common/color-picker/ColorPickerModal.jsx +++ b/src/components/common/color-picker/ColorPickerModal.jsx @@ -8,7 +8,7 @@ import { contextPopupPositionState } from '@/store/popupAtom' export default function ColorPickerModal(props) { const contextPopupPosition = useRecoilValue(contextPopupPositionState) // 현재 메뉴 - const { isShow, setIsShow, pos = contextPopupPosition, color = '#ff0000', setColor, id } = props + const { isShow, setIsShow, pos = contextPopupPosition, color = '#ff0000', setColor, id, isConfig = false } = props const { getMessage } = useMessage() const [originColor, setOriginColor] = useState(color) const { closePopup } = usePopup() @@ -29,7 +29,7 @@ export default function ColorPickerModal(props) { setIsShow(false) } console.log(id) - closePopup(id) + closePopup(id, isConfig) }} > 닫기 @@ -49,7 +49,7 @@ export default function ColorPickerModal(props) { if (setColor) setColor(originColor) if (setIsShow) setIsShow(false) - closePopup(id) + closePopup(id, isConfig) }} > {getMessage('common.message.save')} diff --git a/src/components/floor-plan/modal/grid/DotLineGrid.jsx b/src/components/floor-plan/modal/grid/DotLineGrid.jsx index 520d56dd..f4caa40b 100644 --- a/src/components/floor-plan/modal/grid/DotLineGrid.jsx +++ b/src/components/floor-plan/modal/grid/DotLineGrid.jsx @@ -5,9 +5,7 @@ import { useMessage } from '@/hooks/useMessage' import { canvasState, dotLineGridSettingState, dotLineIntervalSelector } from '@/store/canvasAtom' import { useRecoilState, useRecoilValue, useResetRecoilState, useSetRecoilState } from 'recoil' import { onlyNumberInputChange } from '@/util/input-utils' -import { fabric } from 'fabric' -import { gridColorState } from '@/store/gridAtom' -import { gridDisplaySelector, settingModalGridOptionsState } from '@/store/settingAtom' +import { settingModalGridOptionsState } from '@/store/settingAtom' import { useAxios } from '@/hooks/useAxios' import { useSwal } from '@/hooks/useSwal' import { usePopup } from '@/hooks/usePopup' @@ -33,7 +31,7 @@ export default function DotLineGrid(props) { // const [modalOption, setModalOption] = useRecoilState(modalState); //modal 열림닫힘 state const [objectNo, setObjectNo] = useState('test123240912001') // 이후 삭제 필요 const [close, setClose] = useState(false) - const { id, setIsShow, pos = { x: 840, y: -815 } } = props + const { id, setIsShow, pos = { x: 840, y: -815 }, isConfig = false } = props const setSettingModalGridOptions = useSetRecoilState(settingModalGridOptionsState) const canvas = useRecoilValue(canvasState) @@ -142,7 +140,7 @@ export default function DotLineGrid(props) { await post({ url: `/api/canvas-management/canvas-grid-settings`, data: patternData }).then((res) => { swalFire({ text: getMessage(res.returnMessage) }) setDotLineGridSettingState({ ...currentSetting }) - closePopup(id) + closePopup(id, isConfig) }) } catch (error) { swalFire({ text: getMessage(res.returnMessage), icon: 'error' }) @@ -213,7 +211,7 @@ export default function DotLineGrid(props) { className="modal-close" onClick={() => { setIsShow(false) - closePopup(id) + closePopup(id, isConfig) }} > 닫기 diff --git a/src/components/floor-plan/modal/setting01/GridOption.jsx b/src/components/floor-plan/modal/setting01/GridOption.jsx index 8ef1095f..f3465365 100644 --- a/src/components/floor-plan/modal/setting01/GridOption.jsx +++ b/src/components/floor-plan/modal/setting01/GridOption.jsx @@ -94,6 +94,7 @@ export default function GridOption() { const dotLineGridProps = { id: dotLineId, setIsShow: setShowDotLineGridModal, + isConfig: true, pos: { x: 845, y: 180, @@ -106,6 +107,7 @@ export default function GridOption() { setColor: setGridColor, isShow: showColorPickerModal, setIsShow: setShowColorPickerModal, + isConfig: true, pos: { x: 785, y: 180,