Compare commits
No commits in common. "2ee0dc45f0e962af4a2b1accccd79b2b3948a9f7" and "af627035cd2ba89daaec83f3697d61e7751a43b0" have entirely different histories.
2ee0dc45f0
...
af627035cd
@ -2,7 +2,7 @@ NEXT_PUBLIC_API_SERVER_PATH="https://api.hanasys.jp/"
|
|||||||
|
|
||||||
NEXT_PUBLIC_HOST_URL="//1.248.227.176:4000"
|
NEXT_PUBLIC_HOST_URL="//1.248.227.176:4000"
|
||||||
|
|
||||||
NEXT_PUBLIC_API_HOST_URL="https://www.hanasys.jp"
|
NEXT_PUBLIC_API_HOST_URL="https://www.hanasys.jp/"
|
||||||
|
|
||||||
SESSION_SECRET="i3iHH1yp2/2SpQSIySQ4bpyc4g0D+zCF9FAn5xUG0+Y="
|
SESSION_SECRET="i3iHH1yp2/2SpQSIySQ4bpyc4g0D+zCF9FAn5xUG0+Y="
|
||||||
|
|
||||||
|
|||||||
@ -210,7 +210,6 @@ export const SAVE_KEY = [
|
|||||||
'toFixed',
|
'toFixed',
|
||||||
'startPoint',
|
'startPoint',
|
||||||
'endPoint',
|
'endPoint',
|
||||||
'editable',
|
|
||||||
'isSortedPoints',
|
'isSortedPoints',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@ -195,7 +195,9 @@ export default function Qna() {
|
|||||||
))
|
))
|
||||||
) : (
|
) : (
|
||||||
<tr>
|
<tr>
|
||||||
<td className="al-c no-data" colSpan={5}>{getMessage('common.message.no.data')}</td>
|
<td colSpan={4} className="al-c">
|
||||||
|
{getMessage('common.message.no.data')}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
)}
|
)}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@ -27,7 +27,6 @@ export default function QnaRegModal({ setOpen, setReload, searchValue, selectPag
|
|||||||
const qnaTypeLgCodeRef = useRef(null)
|
const qnaTypeLgCodeRef = useRef(null)
|
||||||
const qnaTypeMdCodeRef = useRef(null)
|
const qnaTypeMdCodeRef = useRef(null)
|
||||||
const qnaTypeSmCodeRef = useRef(null)
|
const qnaTypeSmCodeRef = useRef(null)
|
||||||
const qstMail = useRef(null);
|
|
||||||
const regUserNmRef = useRef(null)
|
const regUserNmRef = useRef(null)
|
||||||
const regUserTelNoRef = useRef(null)
|
const regUserTelNoRef = useRef(null)
|
||||||
const titleRef = useRef(null)
|
const titleRef = useRef(null)
|
||||||
@ -66,7 +65,6 @@ let fileCheck = false;
|
|||||||
const initQnaReg = async () => {
|
const initQnaReg = async () => {
|
||||||
|
|
||||||
|
|
||||||
qstMail.current.value = ''
|
|
||||||
regUserNmRef.current.value = ''
|
regUserNmRef.current.value = ''
|
||||||
regUserTelNoRef.current.value = ''
|
regUserTelNoRef.current.value = ''
|
||||||
qnaTypeLgCodeRef.current.setValue();
|
qnaTypeLgCodeRef.current.setValue();
|
||||||
@ -150,7 +148,7 @@ let fileCheck = false;
|
|||||||
if(!fileCheck) return;
|
if(!fileCheck) return;
|
||||||
|
|
||||||
fileUploadProps.uploadFiles.forEach((file) => {
|
fileUploadProps.uploadFiles.forEach((file) => {
|
||||||
//console.log("file::::::::",file)
|
console.log("file::::::::",file)
|
||||||
formData.push(file)
|
formData.push(file)
|
||||||
|
|
||||||
})
|
})
|
||||||
@ -158,16 +156,6 @@ let fileCheck = false;
|
|||||||
fileCheck = false;
|
fileCheck = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const isValidEmail = (email) => {
|
|
||||||
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
||||||
return emailRegex.test(email);
|
|
||||||
};
|
|
||||||
|
|
||||||
const isEmpty = (value) => {
|
|
||||||
return value === null || value === undefined || value.trim() === "";
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
const handleQnaSubmit = async () => {
|
const handleQnaSubmit = async () => {
|
||||||
//필수 체크
|
//필수 체크
|
||||||
|
|
||||||
@ -176,22 +164,13 @@ let fileCheck = false;
|
|||||||
|
|
||||||
let regUserNm = qnaData?.regUserNm??'';
|
let regUserNm = qnaData?.regUserNm??'';
|
||||||
|
|
||||||
if (!isValidEmail(qnaData.qstMail)) {
|
if (regUserNm.trim().length === 0) {
|
||||||
qstMail.current.focus();
|
|
||||||
swalFire({
|
|
||||||
title: getMessage('qna.reg.alert.require.qstMail'),
|
|
||||||
icon: 'warning',
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (isEmpty(regUserNm)) {
|
|
||||||
regUserNmRef.current.value = '';
|
regUserNmRef.current.value = '';
|
||||||
regUserNmRef.current.focus()
|
regUserNmRef.current.focus()
|
||||||
swalFire({
|
swalFire({
|
||||||
title: getMessage('qna.reg.alert.require.regUserNm'),
|
text: getMessage('qna.reg.alert.require.regUserNm'),
|
||||||
icon: 'warning',
|
type: 'alert',
|
||||||
})
|
})
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@ -199,35 +178,35 @@ let fileCheck = false;
|
|||||||
let qnaClsLrgCd = qnaData?.qnaClsLrgCd??'';
|
let qnaClsLrgCd = qnaData?.qnaClsLrgCd??'';
|
||||||
let qnaClsMidCd = qnaData?.qnaClsMidCd??'';
|
let qnaClsMidCd = qnaData?.qnaClsMidCd??'';
|
||||||
|
|
||||||
if (isEmpty(qnaClsLrgCd) || isEmpty(qnaClsMidCd) ) {
|
if (qnaClsLrgCd.trim().length === 0 || qnaClsMidCd.trim().length === 0 ) {
|
||||||
(isEmpty(qnaClsLrgCd))?qnaTypeLgCodeRef.current.focus():qnaTypeMdCodeRef.current.focus()
|
(qnaClsLrgCd.trim().length === 0)?qnaTypeLgCodeRef.current.focus():qnaTypeMdCodeRef.current.focus()
|
||||||
swalFire({
|
swalFire({
|
||||||
title: getMessage('qna.reg.alert.select.type'),
|
text: getMessage('qna.reg.alert.select.type'),
|
||||||
icon: 'warning',
|
type: 'alert',
|
||||||
})
|
})
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
let title = qnaData?.title??'';
|
let title = qnaData?.title??'';
|
||||||
|
|
||||||
if (isEmpty(title)) {
|
if (title.trim().length === 0) {
|
||||||
titleRef.current.value = '';
|
titleRef.current.value = '';
|
||||||
titleRef.current.focus()
|
titleRef.current.focus()
|
||||||
swalFire({
|
swalFire({
|
||||||
title: getMessage('qna.reg.alert.require.title'),
|
text: getMessage('qna.reg.alert.require.title'),
|
||||||
icon: 'warning',
|
type: 'alert',
|
||||||
})
|
})
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
//console.log("5::::",qnaData)
|
//console.log("5::::",qnaData)
|
||||||
let contents = qnaData?.contents??'';
|
let contents = qnaData?.contents??'';
|
||||||
|
|
||||||
if (isEmpty(contents)) {
|
if (contents.trim().length === 0) {
|
||||||
contentsRef.current.value = '';
|
contentsRef.current.value = '';
|
||||||
contentsRef.current.focus()
|
contentsRef.current.focus()
|
||||||
swalFire({
|
swalFire({
|
||||||
title: getMessage('qna.reg.alert.require.contents'),
|
text: getMessage('qna.reg.alert.require.contents'),
|
||||||
icon: 'warning',
|
type: 'alert',
|
||||||
})
|
})
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@ -331,13 +310,7 @@ let fileCheck = false;
|
|||||||
<th>{getMessage('qna.list.header.regNm')}</th>
|
<th>{getMessage('qna.list.header.regNm')}</th>
|
||||||
<td><input type="text" className="input-light" value={sessionState?.userNm || ''} readOnly /></td>
|
<td><input type="text" className="input-light" value={sessionState?.userNm || ''} readOnly /></td>
|
||||||
<th>E-Mail<span className="red">*</span></th>
|
<th>E-Mail<span className="red">*</span></th>
|
||||||
<td ><input type="text" className="input-light" required
|
<td ><input type="text" className="input-light" value={sessionState?.email || ''} readOnly /></td>
|
||||||
ref={qstMail}
|
|
||||||
value={qnaData?.qstMail || ''}
|
|
||||||
onChange={(e) => setQnaData({...qnaData, qstMail: e.target.value })}
|
|
||||||
onBlur={(e) => setQnaData({ ...qnaData, qstMail: e.target.value })} />
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<th>{getMessage('qna.reg.header.regDt')}</th>
|
<th>{getMessage('qna.reg.header.regDt')}</th>
|
||||||
<td>{dayjs(new Date()).format('YYYY-MM-DD')}</td>
|
<td>{dayjs(new Date()).format('YYYY-MM-DD')}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -428,8 +401,8 @@ let fileCheck = false;
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div className="footer-btn-wrap">
|
<div className="footer-btn-wrap">
|
||||||
{isBtnDisable === false && <button className="btn-origin navy mr5" onClick={handleQnaSubmit}>{getMessage("qna.reg.header.save")}</button>}
|
{isBtnDisable === false && <button className="btn-origin grey mr5" onClick={handleQnaSubmit}>{getMessage("qna.reg.header.save")}</button>}
|
||||||
<button className="btn-origin grey" onClick={() => {
|
<button className="btn-origin navy" onClick={() => {
|
||||||
setOpen(false)
|
setOpen(false)
|
||||||
}}>{getMessage("board.sub.btn.close")}</button>
|
}}>{getMessage("board.sub.btn.close")}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -50,7 +50,6 @@ import JA from '@/locales/ja.json'
|
|||||||
import { QcastContext } from '@/app/QcastProvider'
|
import { QcastContext } from '@/app/QcastProvider'
|
||||||
import { useRoofFn } from '@/hooks/common/useRoofFn'
|
import { useRoofFn } from '@/hooks/common/useRoofFn'
|
||||||
import { usePolygon } from '@/hooks/usePolygon'
|
import { usePolygon } from '@/hooks/usePolygon'
|
||||||
import { useTrestle } from '@/hooks/module/useTrestle'
|
|
||||||
export default function CanvasMenu(props) {
|
export default function CanvasMenu(props) {
|
||||||
const { selectedMenu, setSelectedMenu } = props
|
const { selectedMenu, setSelectedMenu } = props
|
||||||
const pathname = usePathname()
|
const pathname = usePathname()
|
||||||
@ -68,7 +67,6 @@ export default function CanvasMenu(props) {
|
|||||||
const globalLocale = useRecoilValue(globalLocaleStore)
|
const globalLocale = useRecoilValue(globalLocaleStore)
|
||||||
const canvas = useRecoilValue(canvasState)
|
const canvas = useRecoilValue(canvasState)
|
||||||
const { handleZoomClear, handleZoom } = useCanvasEvent()
|
const { handleZoomClear, handleZoom } = useCanvasEvent()
|
||||||
const { setAllModuleSurfaceIsComplete, isAllComplete } = useTrestle()
|
|
||||||
const { handleMenu } = useMenu()
|
const { handleMenu } = useMenu()
|
||||||
// const urlParams = useSearchParams()
|
// const urlParams = useSearchParams()
|
||||||
const { handleEstimateSubmit, fetchSetting, estimateContextState, setEstimateContextState } = useEstimateController()
|
const { handleEstimateSubmit, fetchSetting, estimateContextState, setEstimateContextState } = useEstimateController()
|
||||||
@ -196,7 +194,6 @@ export default function CanvasMenu(props) {
|
|||||||
confirmFn: () => {
|
confirmFn: () => {
|
||||||
//해당 메뉴 이동시 배치면 삭제
|
//해당 메뉴 이동시 배치면 삭제
|
||||||
|
|
||||||
setAllModuleSurfaceIsComplete(false)
|
|
||||||
const moduleSurfacesArray = canvas
|
const moduleSurfacesArray = canvas
|
||||||
.getObjects()
|
.getObjects()
|
||||||
.filter((obj) => [POLYGON_TYPE.MODULE_SETUP_SURFACE, POLYGON_TYPE.MODULE, POLYGON_TYPE.OBJECT_SURFACE].includes(obj.name))
|
.filter((obj) => [POLYGON_TYPE.MODULE_SETUP_SURFACE, POLYGON_TYPE.MODULE, POLYGON_TYPE.OBJECT_SURFACE].includes(obj.name))
|
||||||
@ -236,10 +233,6 @@ export default function CanvasMenu(props) {
|
|||||||
await reloadCanvasStatus(objectNo, pid)
|
await reloadCanvasStatus(objectNo, pid)
|
||||||
break
|
break
|
||||||
case 'estimate':
|
case 'estimate':
|
||||||
if (!isAllComplete()) {
|
|
||||||
swalFire({ text: getMessage('estimate.menu.move.valid1') })
|
|
||||||
return
|
|
||||||
}
|
|
||||||
setIsGlobalLoading(true)
|
setIsGlobalLoading(true)
|
||||||
promiseGet({ url: `/api/estimate/${objectNo}/${selectedPlan.planNo}/detail` }).then((res) => {
|
promiseGet({ url: `/api/estimate/${objectNo}/${selectedPlan.planNo}/detail` }).then((res) => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
|
|||||||
@ -154,7 +154,6 @@ export default function CircuitTrestleSetting({ id }) {
|
|||||||
getPcsVoltageChk(pcsVoltageChkParams).then((res) => {
|
getPcsVoltageChk(pcsVoltageChkParams).then((res) => {
|
||||||
if (res.resultCode === 'S') {
|
if (res.resultCode === 'S') {
|
||||||
setTabNum(2)
|
setTabNum(2)
|
||||||
setAllModuleSurfaceIsComplete(false)
|
|
||||||
} else {
|
} else {
|
||||||
swalFire({
|
swalFire({
|
||||||
title: res.resultMsg,
|
title: res.resultMsg,
|
||||||
@ -188,7 +187,6 @@ export default function CircuitTrestleSetting({ id }) {
|
|||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res?.result.resultCode === 'S' && res?.data) {
|
if (res?.result.resultCode === 'S' && res?.data) {
|
||||||
setTabNum(2)
|
setTabNum(2)
|
||||||
setAllModuleSurfaceIsComplete(false)
|
|
||||||
} else {
|
} else {
|
||||||
swalFire({ text: getMessage('common.message.send.error') })
|
swalFire({ text: getMessage('common.message.send.error') })
|
||||||
}
|
}
|
||||||
@ -288,8 +286,6 @@ export default function CircuitTrestleSetting({ id }) {
|
|||||||
setSelectedModels(pcsItemList)
|
setSelectedModels(pcsItemList)
|
||||||
getPcsVoltageChk(pcsVoltageChkParams).then((res) => {
|
getPcsVoltageChk(pcsVoltageChkParams).then((res) => {
|
||||||
setAllocationType(ALLOCATION_TYPE.PASSIVITY)
|
setAllocationType(ALLOCATION_TYPE.PASSIVITY)
|
||||||
setAllModuleSurfaceIsComplete(false)
|
|
||||||
clearTrestle()
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
swalFire({
|
swalFire({
|
||||||
@ -322,7 +318,6 @@ export default function CircuitTrestleSetting({ id }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setAllocationType(ALLOCATION_TYPE.PASSIVITY)
|
setAllocationType(ALLOCATION_TYPE.PASSIVITY)
|
||||||
clearTrestle()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -659,7 +654,6 @@ export default function CircuitTrestleSetting({ id }) {
|
|||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
setTabNum(2)
|
setTabNum(2)
|
||||||
setAllModuleSurfaceIsComplete(false)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,12 +22,12 @@ export function useCommonUtils() {
|
|||||||
const lengthTextFont = useRecoilValue(fontSelector('lengthText'))
|
const lengthTextFont = useRecoilValue(fontSelector('lengthText'))
|
||||||
const commonTextFont = useRecoilValue(fontSelector('commonText'))
|
const commonTextFont = useRecoilValue(fontSelector('commonText'))
|
||||||
const [commonUtils, setCommonUtilsState] = useRecoilState(commonUtilsState)
|
const [commonUtils, setCommonUtilsState] = useRecoilState(commonUtilsState)
|
||||||
const { addPopup, closeAll } = usePopup()
|
const { addPopup } = usePopup()
|
||||||
const { drawDirectionArrow, addLengthText } = usePolygon()
|
const { drawDirectionArrow, addLengthText } = usePolygon()
|
||||||
const { applyDormers } = useObjectBatch({})
|
const { applyDormers } = useObjectBatch({})
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (commonUtils.text || !commonUtils.text) {
|
if (commonUtils.text) {
|
||||||
commonTextMode()
|
commonTextMode()
|
||||||
} else if (commonUtils.dimension) {
|
} else if (commonUtils.dimension) {
|
||||||
commonDimensionMode()
|
commonDimensionMode()
|
||||||
@ -38,9 +38,7 @@ export function useCommonUtils() {
|
|||||||
|
|
||||||
const commonTextMode = () => {
|
const commonTextMode = () => {
|
||||||
let textbox
|
let textbox
|
||||||
closeAll()
|
|
||||||
if (commonUtils.text) {
|
if (commonUtils.text) {
|
||||||
setTimeout(() => {
|
|
||||||
commonTextKeyEvent()
|
commonTextKeyEvent()
|
||||||
addCanvasMouseEventListener('mouse:down', (event) => {
|
addCanvasMouseEventListener('mouse:down', (event) => {
|
||||||
const pointer = canvas?.getPointer(event.e)
|
const pointer = canvas?.getPointer(event.e)
|
||||||
@ -69,26 +67,6 @@ export function useCommonUtils() {
|
|||||||
textbox.enterEditing()
|
textbox.enterEditing()
|
||||||
textbox.selectAll()
|
textbox.selectAll()
|
||||||
})
|
})
|
||||||
}, 100)
|
|
||||||
} else {
|
|
||||||
const activeObject = canvas?.getActiveObject()
|
|
||||||
if (activeObject && activeObject.name === 'commonText') {
|
|
||||||
if (activeObject && activeObject.isEditing) {
|
|
||||||
if (activeObject.text === '') {
|
|
||||||
canvas?.remove(activeObject)
|
|
||||||
} else {
|
|
||||||
activeObject.exitEditing()
|
|
||||||
}
|
|
||||||
//정책 협의
|
|
||||||
const texts = canvas.getObjects().filter((obj) => obj.name === 'commonText')
|
|
||||||
texts.forEach((text) => {
|
|
||||||
text.set({ editable: false })
|
|
||||||
})
|
|
||||||
canvas.renderAll()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
initEvent()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3077,9 +3077,6 @@ export const useTrestle = () => {
|
|||||||
// 배치면 전체에 가대 설치 여부
|
// 배치면 전체에 가대 설치 여부
|
||||||
const isAllComplete = () => {
|
const isAllComplete = () => {
|
||||||
const surfaces = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE)
|
const surfaces = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE)
|
||||||
if (surfaces.length === 0) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
return surfaces.every((surface) => surface.isComplete)
|
return surfaces.every((surface) => surface.isComplete)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -199,9 +199,6 @@ export function useCanvasSetting(executeEffect = true) {
|
|||||||
if (!executeEffect) {
|
if (!executeEffect) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (roofMaterials.length === 0) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const selectedRoofMaterial = roofMaterials[0]
|
const selectedRoofMaterial = roofMaterials[0]
|
||||||
|
|
||||||
if (addedRoofs.length === 0) {
|
if (addedRoofs.length === 0) {
|
||||||
|
|||||||
@ -2,14 +2,7 @@ import { useRef } from 'react'
|
|||||||
import { useRecoilValue, useSetRecoilState } from 'recoil'
|
import { useRecoilValue, useSetRecoilState } from 'recoil'
|
||||||
import { canvasState, canvasZoomState, currentMenuState, textModeState } from '@/store/canvasAtom'
|
import { canvasState, canvasZoomState, currentMenuState, textModeState } from '@/store/canvasAtom'
|
||||||
import { fabric } from 'fabric'
|
import { fabric } from 'fabric'
|
||||||
import {
|
import { calculateDistance, calculateDistancePoint, calculateIntersection, distanceBetweenPoints, findClosestPoint } from '@/util/canvas-util'
|
||||||
calculateDistance,
|
|
||||||
calculateDistancePoint,
|
|
||||||
calculateIntersection,
|
|
||||||
distanceBetweenPoints,
|
|
||||||
findClosestPoint,
|
|
||||||
getInterSectionLineNotOverCoordinate,
|
|
||||||
} from '@/util/canvas-util'
|
|
||||||
import { useAdsorptionPoint } from '@/hooks/useAdsorptionPoint'
|
import { useAdsorptionPoint } from '@/hooks/useAdsorptionPoint'
|
||||||
import { useDotLineGrid } from '@/hooks/useDotLineGrid'
|
import { useDotLineGrid } from '@/hooks/useDotLineGrid'
|
||||||
import { useTempGrid } from '@/hooks/useTempGrid'
|
import { useTempGrid } from '@/hooks/useTempGrid'
|
||||||
@ -153,7 +146,7 @@ export function useEvent() {
|
|||||||
...innerLinePoints,
|
...innerLinePoints,
|
||||||
]
|
]
|
||||||
|
|
||||||
if (dotLineGridSetting.LINE || canvas.getObjects().filter((obj) => ['lineGrid', 'tempGrid'].includes(obj.name)).length > 1) {
|
if (dotLineGridSetting.LINE || canvas.getObjects().filter((obj) => ['lineGrid', 'tempGrid'].includes(obj.name)).length > 0) {
|
||||||
const closestLine = getClosestLineGrid(pointer)
|
const closestLine = getClosestLineGrid(pointer)
|
||||||
|
|
||||||
const horizonLines = canvas.getObjects().filter((obj) => ['lineGrid', 'tempGrid'].includes(obj.name) && obj.direction === 'horizontal')
|
const horizonLines = canvas.getObjects().filter((obj) => ['lineGrid', 'tempGrid'].includes(obj.name) && obj.direction === 'horizontal')
|
||||||
@ -267,9 +260,7 @@ export function useEvent() {
|
|||||||
arrivalPoint = guideIntersectionPoint
|
arrivalPoint = guideIntersectionPoint
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {}
|
||||||
console.error(e)
|
|
||||||
}
|
|
||||||
|
|
||||||
const horizontalLine = new fabric.Line([-4 * canvas.width, arrivalPoint.y, 4 * canvas.width, arrivalPoint.y], {
|
const horizontalLine = new fabric.Line([-4 * canvas.width, arrivalPoint.y, 4 * canvas.width, arrivalPoint.y], {
|
||||||
stroke: 'red',
|
stroke: 'red',
|
||||||
@ -307,12 +298,7 @@ export function useEvent() {
|
|||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
//임의 그리드 모드일 경우
|
//임의 그리드 모드일 경우
|
||||||
let originPointer = { x: e.offsetX, y: e.offsetY }
|
let pointer = { x: e.offsetX, y: e.offsetY }
|
||||||
const mouseLines = canvas.getObjects().filter((obj) => obj.name === 'mouseLine')
|
|
||||||
let pointer = getInterSectionLineNotOverCoordinate(mouseLines[0], mouseLines[1]) || {
|
|
||||||
x: Math.round(originPointer.x),
|
|
||||||
y: Math.round(originPointer.y),
|
|
||||||
}
|
|
||||||
|
|
||||||
const tempGrid = new fabric.Line([-1500, pointer.y, 2500, pointer.y], {
|
const tempGrid = new fabric.Line([-1500, pointer.y, 2500, pointer.y], {
|
||||||
stroke: gridColor,
|
stroke: gridColor,
|
||||||
|
|||||||
@ -2,7 +2,6 @@ import { canvasState, tempGridModeState } from '@/store/canvasAtom'
|
|||||||
import { useRecoilState, useRecoilValue } from 'recoil'
|
import { useRecoilState, useRecoilValue } from 'recoil'
|
||||||
import { gridColorState } from '@/store/gridAtom'
|
import { gridColorState } from '@/store/gridAtom'
|
||||||
import { gridDisplaySelector } from '@/store/settingAtom'
|
import { gridDisplaySelector } from '@/store/settingAtom'
|
||||||
import { useMouse } from '@/hooks/useMouse'
|
|
||||||
|
|
||||||
const GRID_PADDING = 5
|
const GRID_PADDING = 5
|
||||||
export function useTempGrid() {
|
export function useTempGrid() {
|
||||||
@ -10,10 +9,10 @@ export function useTempGrid() {
|
|||||||
const gridColor = useRecoilValue(gridColorState)
|
const gridColor = useRecoilValue(gridColorState)
|
||||||
const isGridDisplay = useRecoilValue(gridDisplaySelector)
|
const isGridDisplay = useRecoilValue(gridDisplaySelector)
|
||||||
const [tempGridMode, setTempGridMode] = useRecoilState(tempGridModeState)
|
const [tempGridMode, setTempGridMode] = useRecoilState(tempGridModeState)
|
||||||
const { getIntersectMousePoint } = useMouse()
|
|
||||||
const tempGridModeStateLeftClickEvent = (e) => {
|
const tempGridModeStateLeftClickEvent = (e) => {
|
||||||
//임의 그리드 모드일 경우
|
//임의 그리드 모드일 경우
|
||||||
let pointer = getIntersectMousePoint(e)
|
let pointer = canvas.getPointer(e.e)
|
||||||
|
|
||||||
const tempGrid = new fabric.Line([pointer.x, -1500, pointer.x, 2500], {
|
const tempGrid = new fabric.Line([pointer.x, -1500, pointer.x, 2500], {
|
||||||
stroke: gridColor,
|
stroke: gridColor,
|
||||||
|
|||||||
@ -612,7 +612,6 @@
|
|||||||
"qna.reg.header.contents": "お問い合わせ内容",
|
"qna.reg.header.contents": "お問い合わせ内容",
|
||||||
"qna.reg.header.fileList": "ファイル添付",
|
"qna.reg.header.fileList": "ファイル添付",
|
||||||
"qna.reg.header.save": "保存",
|
"qna.reg.header.save": "保存",
|
||||||
"qna.reg.alert.require.qstMail": "無効なメール形式です。",
|
|
||||||
"qna.reg.alert.require.regUserNm": "名前を入力してください。",
|
"qna.reg.alert.require.regUserNm": "名前を入力してください。",
|
||||||
"qna.reg.alert.select.type": "お問い合わせ区分を選択してください。",
|
"qna.reg.alert.select.type": "お問い合わせ区分を選択してください。",
|
||||||
"qna.reg.alert.require.title": "タイトルを入力してください。",
|
"qna.reg.alert.require.title": "タイトルを入力してください。",
|
||||||
|
|||||||
@ -612,7 +612,6 @@
|
|||||||
"qna.reg.header.contents": "문의정보",
|
"qna.reg.header.contents": "문의정보",
|
||||||
"qna.reg.header.fileList": "파일첨부",
|
"qna.reg.header.fileList": "파일첨부",
|
||||||
"qna.reg.header.save": "저장",
|
"qna.reg.header.save": "저장",
|
||||||
"qna.reg.alert.require.qstMail": "올바르지 않은 이메일 형식입니다.",
|
|
||||||
"qna.reg.alert.require.regUserNm": "이름을 입력하세요.",
|
"qna.reg.alert.require.regUserNm": "이름을 입력하세요.",
|
||||||
"qna.reg.alert.select.type": "문의구분을 선택하세요.",
|
"qna.reg.alert.select.type": "문의구분을 선택하세요.",
|
||||||
"qna.reg.alert.require.title": "제목을 입력하세요.",
|
"qna.reg.alert.require.title": "제목을 입력하세요.",
|
||||||
|
|||||||
@ -447,11 +447,10 @@
|
|||||||
border-top: none;
|
border-top: none;
|
||||||
.community_detail-file-wrap{
|
.community_detail-file-wrap{
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
margin-bottom: 24px;
|
|
||||||
}
|
}
|
||||||
.community_detail-inner{
|
.community_detail-inner{
|
||||||
max-height: 110px;
|
max-height: 110px;
|
||||||
margin-top: 0;
|
margin-top: 24px;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -462,14 +461,12 @@
|
|||||||
border: 1px solid #101010;
|
border: 1px solid #101010;
|
||||||
.community_detail-inner{
|
.community_detail-inner{
|
||||||
max-height: 110px;
|
max-height: 110px;
|
||||||
margin-top: 20px;
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
}
|
||||||
.community_detail-file-wrap{
|
.community_detail-file-wrap{
|
||||||
border-top: 1px solid #D4DCE7;
|
border-top: 1px solid #D4DCE7;
|
||||||
padding: 16px 0 0 0;
|
padding: 16px 0 0 0;
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
margin-top: 20px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user