diff --git a/src/components/community/modal/QnaDetailModal.jsx b/src/components/community/modal/QnaDetailModal.jsx
index 5db51cc3..0e25d3a8 100644
--- a/src/components/community/modal/QnaDetailModal.jsx
+++ b/src/components/community/modal/QnaDetailModal.jsx
@@ -73,7 +73,7 @@ export default function QnaDetailModal({ qnaNo, setOpen, qnaType }) {
{getMessage('qna.detail.sub.fileList')}
{boardDetail.listFile.map((boardFile) => (
-
diff --git a/src/components/floor-plan/CanvasFrame.jsx b/src/components/floor-plan/CanvasFrame.jsx
index 0b806d0c..09fdd89c 100644
--- a/src/components/floor-plan/CanvasFrame.jsx
+++ b/src/components/floor-plan/CanvasFrame.jsx
@@ -76,8 +76,12 @@ export default function CanvasFrame() {
}
initEvent()
})
+ } else {
+ setSelectedMenu(null)
}
Object.keys(currentCanvasPlan).length > 0 && canvas && handleModuleSelectionTotal()
+ } else {
+ setSelectedMenu(null)
}
gridInit()
}
diff --git a/src/hooks/useEvent.js b/src/hooks/useEvent.js
index d701bcd9..9f9e4ea0 100644
--- a/src/hooks/useEvent.js
+++ b/src/hooks/useEvent.js
@@ -160,6 +160,7 @@ export function useEvent() {
const verticalLines = canvas.getObjects().filter((obj) => ['lineGrid', 'tempGrid'].includes(obj.name) && obj.direction === 'vertical')
if (!horizonLines || !verticalLines) {
+ drawMouseLine(pointer)
return
}
@@ -183,6 +184,7 @@ export function useEvent() {
}
if (!closestVerticalLine || !closestHorizontalLine) {
+ drawMouseLine(pointer)
return
}
@@ -271,7 +273,14 @@ export function useEvent() {
console.error(e)
}
- const horizontalLine = new fabric.Line([-4 * canvas.width, arrivalPoint.y, 4 * canvas.width, arrivalPoint.y], {
+ drawMouseLine(arrivalPoint)
+
+ // 캔버스를 다시 그립니다.
+ canvas?.renderAll()
+ }
+
+ const drawMouseLine = (pointer) => {
+ const horizontalLine = new fabric.Line([-4 * canvas.width, pointer.y, 4 * canvas.width, pointer.y], {
stroke: 'red',
strokeWidth: 1,
selectable: false,
@@ -279,7 +288,7 @@ export function useEvent() {
})
// 세로선
- const verticalLine = new fabric.Line([arrivalPoint.x, -4 * canvas.height, arrivalPoint.x, 4 * canvas.height], {
+ const verticalLine = new fabric.Line([pointer.x, -4 * canvas.height, pointer.x, 4 * canvas.height], {
stroke: 'red',
strokeWidth: 1,
selectable: false,
@@ -288,9 +297,6 @@ export function useEvent() {
// 선들을 캔버스에 추가합니다.
canvas?.add(horizontalLine, verticalLine)
-
- // 캔버스를 다시 그립니다.
- canvas?.renderAll()
}
const removeMouseLine = () => {
diff --git a/src/hooks/usePlan.js b/src/hooks/usePlan.js
index 15783727..d8e1c9d6 100644
--- a/src/hooks/usePlan.js
+++ b/src/hooks/usePlan.js
@@ -3,9 +3,17 @@
import { useContext, useEffect, useState } from 'react'
import { usePathname, useRouter } from 'next/navigation'
-import { useRecoilState, useResetRecoilState } from 'recoil'
+import { useRecoilState, useResetRecoilState, useSetRecoilState } from 'recoil'
-import { canvasState, currentCanvasPlanState, plansState, canvasSettingState, currentObjectState, moduleSetupSurfaceState } from '@/store/canvasAtom'
+import {
+ canvasState,
+ currentCanvasPlanState,
+ plansState,
+ canvasSettingState,
+ currentObjectState,
+ moduleSetupSurfaceState,
+ currentMenuState,
+} from '@/store/canvasAtom'
import { useAxios } from '@/hooks/useAxios'
import { useMessage } from '@/hooks/useMessage'
import { useSwal } from '@/hooks/useSwal'
@@ -33,7 +41,7 @@ export function usePlan(params = {}) {
const { floorPlanState } = useContext(FloorPlanContext)
const [selectedPlan, setSelectedPlan] = useState(null)
-
+ const setCurrentMenu = useSetRecoilState(currentMenuState)
const [canvas, setCanvas] = useRecoilState(canvasState)
const [currentCanvasPlan, setCurrentCanvasPlan] = useRecoilState(currentCanvasPlanState)
@@ -577,8 +585,10 @@ export function usePlan(params = {}) {
* plan canvasStatus 초기화
*/
const resetCanvasStatus = () => {
- setCurrentCanvasPlan((prev) => ({ ...prev, canvasStatus: null }))
+ setCurrentCanvasPlan((prev) => ({ ...prev, canvasStatus: null, objectNo: null, planNo: null, id: null }))
setPlans((plans) => plans.map((plan) => ({ ...plan, canvasStatus: null })))
+ setCurrentMenu(null)
+ setSelectedMenu(null)
}
/**
diff --git a/src/locales/ja.json b/src/locales/ja.json
index d90cab69..8ce666f8 100644
--- a/src/locales/ja.json
+++ b/src/locales/ja.json
@@ -956,7 +956,7 @@
"estimate.detail.dragFileGuide": "(※北面設置の場合、ファイル添付が必須です。)",
"estimate.detail.header.fileList1": "ファイル添付",
"estimate.detail.fileList.btn": "ファイル選択",
- "estimate.detail.fileList.extCheck": "画像ファイルのみ添付可能です。",
+ "estimate.detail.fileList.extCheck": "画像、PDF、Excel ファイルのみ添付できます。",
"estimate.detail.header.fileList2": "添付ファイル一覧",
"estimate.detail.fileList2.btn.return": "復元",
"estimate.detail.header.specialEstimate": "見積特記事項",
@@ -1078,6 +1078,7 @@
"module.not.found": "インストールモジュールを選択してください。",
"module.circuit.minimun.error": "回路番号は1以上の数値を入力してください。",
"module.already.exist.error": "回路番号が同じで異なるパワーコンディショナのモジュールがあります。 別の回路番号を設定してください。",
+ "module.circuit.fix.not.same.roof.error": "異なる屋根面のモジュールが選択されています。 モジュールの選択をや直してください。",
"construction.length.difference": "屋根面工法をすべて選択してください。",
"menu.validation.canvas.roof": "パネルを配置するには、屋根面を入力する必要があります。",
"batch.object.outside.roof": "オブジェクトは屋根に設置する必要があります。",