From 1750ba53fdd30f2fd4250256e692268113ad6474 Mon Sep 17 00:00:00 2001 From: ysCha Date: Mon, 7 Jul 2025 11:07:31 +0900 Subject: [PATCH 1/8] =?UTF-8?q?[1165]=20=EB=8F=84=EB=A9=B4=EC=9D=84=20?= =?UTF-8?q?=EC=97=B4=EA=B3=A0=20=EC=9E=88=EC=9D=84=20=EB=95=8C,=20?= =?UTF-8?q?=EC=83=81=EB=B6=80=20=EB=A9=94=EB=89=B4=EB=A5=BC=20=EB=88=8C?= =?UTF-8?q?=EB=A0=80=EC=9D=84=20=EB=95=8C=EC=9D=98=20=EA=B1=B0=EB=8F=99=20?= =?UTF-8?q?=EC=9E=AC=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/header/Header.jsx | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/components/header/Header.jsx b/src/components/header/Header.jsx index 2e9f297c..8b37b134 100644 --- a/src/components/header/Header.jsx +++ b/src/components/header/Header.jsx @@ -241,7 +241,7 @@ export default function Header(props) { e.preventDefault() // 기본 네비게이션 방지 e.stopPropagation() // 이벤트 전파 방지 swalFire({ - text : getMessage(common.link.confirm), // 적절한 확인 메시지 + text : getMessage('common.link.confirm'), // 적절한 확인 메시지 type : 'confirm', confirmFn: () => { // 확인 버튼 클릭 시 실행 @@ -323,14 +323,28 @@ export default function Header(props) {

{ + onClick={(e) => { setStuffSearch({ ...stuffSearch, code: 'DELETE', }) if (pathName === '/') { window.location.reload() + } else if(pathName === '/floor-plan') { + e.preventDefault() // 기본 네비게이션 방지 + e.stopPropagation() // 이벤트 전파 방지 + swalFire({ + text: getMessage('common.link.confirm'), // 적절한 확인 메시지 + type: 'confirm', + confirmFn: () => { + // 확인 버튼 클릭 시 기존 로직 실행 + //removeStuffRecoil(m) + router.push('/') + } + }) } + + }} >

From 9c54c135b727bb7b2dec48b56a4dd181187cad30 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Mon, 7 Jul 2025 11:10:56 +0900 Subject: [PATCH 2/8] =?UTF-8?q?=EB=B0=9C=EC=A0=84=20=EC=8B=9C=EB=AE=AC?= =?UTF-8?q?=EB=A0=88=EC=9D=B4=EC=85=98=20=EA=B0=81=EB=8F=84=20=EA=B3=84?= =?UTF-8?q?=EC=82=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/module/useTrestle.js | 42 ++++++++++++++++------------------ 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/src/hooks/module/useTrestle.js b/src/hooks/module/useTrestle.js index 17f6711a..29f2d664 100644 --- a/src/hooks/module/useTrestle.js +++ b/src/hooks/module/useTrestle.js @@ -807,59 +807,57 @@ export const useTrestle = () => { const getAzimuth = (parent) => { const { moduleCompass, surfaceCompass, direction } = parent + if(surfaceCompass) { + return -surfaceCompass + } + let resultAzimuth = surfaceCompass || moduleCompass + + switch (direction) { case 'south': { - if (resultAzimuth < 0) { - return -1 * resultAzimuth - } else if (resultAzimuth === 0) { - return 0 - } else if (resultAzimuth < 180) { - return -1 * resultAzimuth - } else if (resultAzimuth === 180) { - return 180 - } + return resultAzimuth } case 'north': { if (resultAzimuth < 0) { - return -1 * (180 + resultAzimuth) + return 180 + resultAzimuth } else if (resultAzimuth === 0) { return 180 } else if (resultAzimuth < 180) { - return 180 - resultAzimuth + return resultAzimuth - 180 } else if (resultAzimuth === 180) { return 0 } } case 'west': { if (resultAzimuth > -180 && resultAzimuth < 0) { - return -1 * (90 + resultAzimuth) + return 90 + resultAzimuth } else if (resultAzimuth === 0) { - return -180 + (90 - resultAzimuth) + return 90 - resultAzimuth } else if (resultAzimuth < 180) { if (resultAzimuth > 90) { - return 180 + (90 - resultAzimuth) + return -180 + (resultAzimuth - 90) } - return -180 + (90 - resultAzimuth) - } else if (resultAzimuth === 180) { return 180 + (90 - resultAzimuth) + } else if (resultAzimuth === 180) { + return -180 + (resultAzimuth - 90) } } case 'east': { if (resultAzimuth === 0) { - return 90 - resultAzimuth + return -180 + (90 - resultAzimuth) } else if (resultAzimuth > 0 && resultAzimuth < 180) { - return 90 - resultAzimuth + return resultAzimuth - 90 } else if (resultAzimuth === 180) { - return 90 - resultAzimuth + return resultAzimuth - 90 } else if (resultAzimuth > -180 && resultAzimuth < 0) { - if (resultAzimuth < -90) { - return -180 - (90 + resultAzimuth) + if (resultAzimuth <= -90) { + return 180 + (90 + resultAzimuth) } - return 180 - (90 + resultAzimuth) + return -180 + (90 + resultAzimuth) } } } From 4bd21c1662202ab2325c701a9b5d196404d00366 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Mon, 7 Jul 2025 11:31:48 +0900 Subject: [PATCH 3/8] =?UTF-8?q?[1169]=20:=20=E3=80=90HANASYS=20DESIGN?= =?UTF-8?q?=E3=80=91=E8=A3=9C=E5=8A=A9=E7=B7=9A=E3=82=92=E4=BD=9C=E6=88=90?= =?UTF-8?q?=E3=81=97=E3=80=81=E5=B1=8B=E6=A0=B9=E9=9D=A2=E3=82=92=E5=89=B2?= =?UTF-8?q?=E3=82=8A=E5=BD=93=E3=81=A6=E3=81=97=E3=81=9F=E3=81=A8=E3=81=8D?= =?UTF-8?q?=E3=81=AE=E8=A1=A8=E8=A8=98=20=EB=B2=88=EC=97=AD=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../floor-plan/modal/roofAllocation/ActualSizeSetting.jsx | 4 ++-- src/hooks/roofcover/useRoofAllocationSetting.js | 2 +- src/locales/ja.json | 4 +++- src/locales/ko.json | 4 +++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/components/floor-plan/modal/roofAllocation/ActualSizeSetting.jsx b/src/components/floor-plan/modal/roofAllocation/ActualSizeSetting.jsx index c91325c0..2970a7ab 100644 --- a/src/components/floor-plan/modal/roofAllocation/ActualSizeSetting.jsx +++ b/src/components/floor-plan/modal/roofAllocation/ActualSizeSetting.jsx @@ -27,7 +27,7 @@ export default function ActualSizeSetting(props) { const handleFinish = () => { swalFire({ - text: '완료 하시겠습니까?', + text: getMessage("modal.roof.allocation.auxiliary.accept"), type: 'confirm', confirmFn: () => { handleAlloc() @@ -37,7 +37,7 @@ export default function ActualSizeSetting(props) { const handleClose = () => { swalFire({ - text: '완료 하시겠습니까?', + text: getMessage("modal.roof.allocation.auxiliary.accept"), type: 'confirm', confirmFn: () => { handleAlloc() diff --git a/src/hooks/roofcover/useRoofAllocationSetting.js b/src/hooks/roofcover/useRoofAllocationSetting.js index 53d1956b..dfe4c87d 100644 --- a/src/hooks/roofcover/useRoofAllocationSetting.js +++ b/src/hooks/roofcover/useRoofAllocationSetting.js @@ -342,7 +342,7 @@ export function useRoofAllocationSetting(id) { if (!checkInnerLines()) { apply() } else { - swalFire({ type: 'alert', icon: 'error', text: getMessage('실제치수를 입력해 주세요.') }) + swalFire({ type: 'alert', icon: 'error', text: getMessage('modal.roof.allocation.auxiliary.size.form') }) } } diff --git a/src/locales/ja.json b/src/locales/ja.json index f27b8d7f..a91da599 100644 --- a/src/locales/ja.json +++ b/src/locales/ja.json @@ -1117,5 +1117,7 @@ "modal.module.basic.setting.module.placement.max.rows.multiple": "2種混合時\rの最大段数", "modal.module.basic.setting.module.placement.mix.asg.yn.error": "混合インストール不可能なモジュールです。 (JA)", "modal.module.basic.setting.module.placement.mix.asg.yn": "混合", - "modal.module.basic.setting.module.placement.over.max.row": "{0} 最大段数超過しました。最大段数表を参考にしてください。" + "modal.module.basic.setting.module.placement.over.max.row": "{0} 最大段数超過しました。最大段数表を参考にしてください。", + "modal.roof.allocation.auxiliary.accept": "完了しますか?", + "modal.roof.allocation.auxiliary.size.form": "補助線の寸法を入力してください。" } diff --git a/src/locales/ko.json b/src/locales/ko.json index 3dd00617..c0cd43af 100644 --- a/src/locales/ko.json +++ b/src/locales/ko.json @@ -1117,5 +1117,7 @@ "modal.module.basic.setting.module.placement.max.rows.multiple": "2종 혼합 최대단수", "modal.module.basic.setting.module.placement.mix.asg.yn.error": "혼합 설치 불가능한 모듈입니다.", "modal.module.basic.setting.module.placement.mix.asg.yn": "혼합", - "modal.module.basic.setting.module.placement.over.max.row": "{0}의 최대단수를 초과했습니다. 최대단수표를 참고해 주세요." + "modal.module.basic.setting.module.placement.over.max.row": "{0}의 최대단수를 초과했습니다. 최대단수표를 참고해 주세요.", + "modal.roof.allocation.auxiliary.accept": "완료하시겠습니까?", + "modal.roof.allocation.auxiliary.size.form": "실제치수를 입력해 주세요." } From 16432f94cdd6843da8725071ef2b4d8d7f7c52a0 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Mon, 7 Jul 2025 13:19:38 +0900 Subject: [PATCH 4/8] =?UTF-8?q?[1179]=20:=20=E3=80=90HANASYS=20DESIGN?= =?UTF-8?q?=E3=80=91=E8=A3=9C=E5=8A=A9=E7=B7=9A=E3=81=AB=E3=81=A4=E3=81=84?= =?UTF-8?q?=E3=81=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 보조선 선택 로직 수정 --- src/components/fabric/QLine.js | 42 ++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/src/components/fabric/QLine.js b/src/components/fabric/QLine.js index 9c9791c9..ea316903 100644 --- a/src/components/fabric/QLine.js +++ b/src/components/fabric/QLine.js @@ -182,4 +182,46 @@ export const QLine = fabric.util.createClass(fabric.Line, { } return this }, + + containsPoint: function(point) { + const boundingRect = this.getBoundingRect(true) + + // 선의 방향 판단 + const dx = Math.abs(this.x2 - this.x1) + const dy = Math.abs(this.y2 - this.y1) + const isVertical = dx < dy && dx < 10 // 세로선 (가로 변화가 작음) + const isDiagonal = dx > 10 && dy > 10 // 대각선 (가로, 세로 모두 변화) + + let reducedWidth, reducedHeight + + if (isDiagonal) { + // 대각선의 경우: 1/2 크기 + reducedWidth = boundingRect.width / 2 + reducedHeight = boundingRect.height / 2 + } else if (isVertical) { + // 세로선의 경우: 가로 선택범위 2배 + reducedWidth = boundingRect.width * 2 + reducedHeight = boundingRect.height / 3 + } else { + // 가로선의 경우: 세로 선택범위 2배 + reducedWidth = boundingRect.width / 3 + reducedHeight = boundingRect.height * 2 + } + + // 축소된 영역의 중심점 계산 + const centerX = boundingRect.left + boundingRect.width / 2 + const centerY = boundingRect.top + boundingRect.height / 2 + + // 축소된 영역의 경계 계산 + const left = centerX - reducedWidth / 2 + const top = centerY - reducedHeight / 2 + const right = centerX + reducedWidth / 2 + const bottom = centerY + reducedHeight / 2 + + // 점이 축소된 영역 내에 있는지 확인 + return point.x >= left && + point.x <= right && + point.y >= top && + point.y <= bottom + }, }) From 2b0df28ab9ab0c318ff82a798dd3ab56e367e24c Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Mon, 7 Jul 2025 13:42:50 +0900 Subject: [PATCH 5/8] =?UTF-8?q?=EC=8A=A4=ED=81=AC=EB=A6=B0=EC=83=B7=20?= =?UTF-8?q?=EC=B0=8D=EC=9D=84=20=EA=B2=BD=EC=9A=B0=200,0=20=EC=9D=84=20?= =?UTF-8?q?=EA=B8=B0=EC=A4=80=EC=9C=BC=EB=A1=9C=2050%=20=EC=B6=95=EC=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx b/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx index 26dbf402..2e301026 100644 --- a/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx +++ b/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx @@ -124,8 +124,8 @@ export default function CircuitTrestleSetting({ id }) { // 캡쳐 전 처리 const beforeCapture = () => { // setCanvasZoom(100) - const x = canvas.width / 2 - const y = canvas.height / 2 + const x = 0 + const y = 0 canvas.zoomToPoint(new fabric.Point(x, y), 0.5) changeFontSize('lengthText', '28') changeFontSize('circuitNumber', '28') From a4d74bb41b84ff09e9be448102f900268a0a40d0 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Mon, 7 Jul 2025 16:15:38 +0900 Subject: [PATCH 6/8] =?UTF-8?q?=EB=B3=B4=EC=A1=B0=EC=84=A0=20=EC=9E=90?= =?UTF-8?q?=EB=A5=B4=EA=B8=B0=20=EC=9E=91=EB=8F=99=20=EC=9D=B4=EC=83=81=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/roofcover/useAuxiliaryDrawing.js | 27 +++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/hooks/roofcover/useAuxiliaryDrawing.js b/src/hooks/roofcover/useAuxiliaryDrawing.js index c854ae77..aad5a715 100644 --- a/src/hooks/roofcover/useAuxiliaryDrawing.js +++ b/src/hooks/roofcover/useAuxiliaryDrawing.js @@ -710,9 +710,34 @@ export function useAuxiliaryDrawing(id, isUseEffect = true) { //보조선과 만나는 점을 찾는다. innerLines.forEach((line2) => { + // line1이 canvas에 없는 경우 return + if (!canvas.getObjects().includes(line1)) { + return + } + if (line1 === line2) { return } + // const originLine1 = { + // stroke : line1.stroke, + // strokeWidth: line1.strokeWidth + // } + // const originLine2 = { + // stroke: line2.stroke, + // strokeWidth: line2.strokeWidth + // } + // line1.set({stroke: 'red', strokeWidth: 10}) + // line2.set({stroke: 'blue', strokeWidth: 10}) + // + // canvas.renderAll() + // + // debugger + // + // line1.set(originLine1) + // line2.set(originLine2) + // canvas.renderAll() + + const intersectionPoint = calculateIntersection(line1, line2) if (!intersectionPoint) { return @@ -723,7 +748,7 @@ export function useAuxiliaryDrawing(id, isUseEffect = true) { const distance1 = distanceBetweenPoints({ x: line1.x1, y: line1.y1 }, intersectionPoint) const distance2 = distanceBetweenPoints({ x: line1.x2, y: line1.y2 }, intersectionPoint) - if (distance1 < 1 || distance2 < 1) { + if (distance1 < 2 || distance2 < 2) { return } //historyLine에서 기존 line을 제거한다. From 7ccdda6405e8cf4d017b1aa434a8d075dae254df Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Mon, 7 Jul 2025 17:05:59 +0900 Subject: [PATCH 7/8] =?UTF-8?q?=EC=BA=A1=EC=B3=90=20=EC=A0=84=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../circuitTrestle/CircuitTrestleSetting.jsx | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx b/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx index 2e301026..bf3c40cc 100644 --- a/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx +++ b/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx @@ -109,10 +109,10 @@ export default function CircuitTrestleSetting({ id }) { const capture = (type) => { beforeCapture() - setTimeout(() => { - handleCanvasToPng(type) - afterCapture() - }, 1000) + + handleCanvasToPng(type) + + afterCapture() return new Promise((resolve) => { setTimeout(() => { @@ -124,8 +124,22 @@ export default function CircuitTrestleSetting({ id }) { // 캡쳐 전 처리 const beforeCapture = () => { // setCanvasZoom(100) - const x = 0 - const y = 0 + const arrows = canvas.getObjects().filter((obj) => obj.name === 'arrow') + + let x,y + + x = canvas.width / 2 + y = canvas.height / 2 + + // 화살표가 음수 영역에 있을 경우 0,0 기준으로 50% 축소 + if(arrows.every((arrow) => arrow.left > 0) && arrows.every((arrow) => arrow.top > 0)) { + x = 0 + y = 0 + } + + + + canvas.zoomToPoint(new fabric.Point(x, y), 0.5) changeFontSize('lengthText', '28') changeFontSize('circuitNumber', '28') From 8354770a9ef0d9786299442a455a3dfe7ad79a4c Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Mon, 7 Jul 2025 17:36:33 +0900 Subject: [PATCH 8/8] =?UTF-8?q?=EB=B0=9C=EC=A0=84=20=EC=8B=9C=EB=AE=AC?= =?UTF-8?q?=EB=A0=88=EC=9D=B4=EC=85=98=20=EA=B0=81=EB=8F=84=20=EA=B3=84?= =?UTF-8?q?=EC=82=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/module/useTrestle.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/module/useTrestle.js b/src/hooks/module/useTrestle.js index 29f2d664..9fa75e67 100644 --- a/src/hooks/module/useTrestle.js +++ b/src/hooks/module/useTrestle.js @@ -811,7 +811,7 @@ export const useTrestle = () => { return -surfaceCompass } - let resultAzimuth = surfaceCompass || moduleCompass + let resultAzimuth = moduleCompass @@ -840,7 +840,7 @@ export const useTrestle = () => { if (resultAzimuth > 90) { return -180 + (resultAzimuth - 90) } - return 180 + (90 - resultAzimuth) + return 180 + (resultAzimuth - 90) } else if (resultAzimuth === 180) { return -180 + (resultAzimuth - 90) }