dev #195
@ -73,7 +73,7 @@ export default function QnaDetailModal({ qnaNo, setOpen, qnaType }) {
|
||||
<dt>{getMessage('qna.detail.sub.fileList')}</dt>
|
||||
{boardDetail.listFile.map((boardFile) => (
|
||||
<dd key={boardFile.encodeFileNo}>
|
||||
<button type="button" className="down" onClick={() => handleFileDown(boardFile.fileNo, 'N')}>
|
||||
<button type="button" className="down" onClick={() => handleFileDown(boardFile.fileNo, 'NO')}>
|
||||
{boardFile.srcFileNm}
|
||||
</button>
|
||||
</dd>
|
||||
|
||||
@ -76,8 +76,12 @@ export default function CanvasFrame() {
|
||||
}
|
||||
initEvent()
|
||||
})
|
||||
} else {
|
||||
setSelectedMenu(null)
|
||||
}
|
||||
Object.keys(currentCanvasPlan).length > 0 && canvas && handleModuleSelectionTotal()
|
||||
} else {
|
||||
setSelectedMenu(null)
|
||||
}
|
||||
gridInit()
|
||||
}
|
||||
|
||||
@ -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 = () => {
|
||||
|
||||
@ -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)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -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": "オブジェクトは屋根に設置する必要があります。",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user