From aaeae69453bf21dc2d4ff55df8c8e67b5a5e1b8b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=8B=9D?=
<43837214+Minsiki@users.noreply.github.com>
Date: Tue, 4 Mar 2025 16:52:35 +0900
Subject: [PATCH 01/10] =?UTF-8?q?=EC=A7=80=EB=B6=95=EC=9E=AC=20=EC=A0=95?=
=?UTF-8?q?=EB=A0=AC=EB=B0=A9=EC=8B=9D=20=EC=82=AD=EC=A0=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ContextRoofAllocationSetting.jsx | 23 +------------------
.../roofAllocation/RoofAllocationSetting.jsx | 6 ++---
2 files changed, 4 insertions(+), 25 deletions(-)
diff --git a/src/components/floor-plan/modal/roofAllocation/ContextRoofAllocationSetting.jsx b/src/components/floor-plan/modal/roofAllocation/ContextRoofAllocationSetting.jsx
index eb76dcb8..37fc53bc 100644
--- a/src/components/floor-plan/modal/roofAllocation/ContextRoofAllocationSetting.jsx
+++ b/src/components/floor-plan/modal/roofAllocation/ContextRoofAllocationSetting.jsx
@@ -205,7 +205,7 @@ export default function ContextRoofAllocationSetting(props) {
)}
-
{getMessage('slope')}
+
{getMessage('modal.object.setting.offset.slope')}
{pitchText}
-
-
-
-
-
-
)
diff --git a/src/components/floor-plan/modal/roofAllocation/RoofAllocationSetting.jsx b/src/components/floor-plan/modal/roofAllocation/RoofAllocationSetting.jsx
index 965f1ec9..7723b9de 100644
--- a/src/components/floor-plan/modal/roofAllocation/RoofAllocationSetting.jsx
+++ b/src/components/floor-plan/modal/roofAllocation/RoofAllocationSetting.jsx
@@ -202,7 +202,7 @@ export default function RoofAllocationSetting(props) {
)}
-
{getMessage('slope')}
+
{getMessage('modal.object.setting.offset.slope')}
{pitchText}
-
*/}
)
From 2f53c6e22ec82d0eb1d93ea1a586af4c76507cf1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=8B=9D?=
<43837214+Minsiki@users.noreply.github.com>
Date: Tue, 4 Mar 2025 16:52:58 +0900
Subject: [PATCH 02/10] =?UTF-8?q?surface=20=EC=9E=88=EB=8A=94=20=EC=83=81?=
=?UTF-8?q?=ED=83=9C=EC=97=90=EC=84=9C=20=EB=B0=B0=EC=B9=98=EB=A9=B4?=
=?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EC=9D=B4=EB=8F=99=EC=8B=9C=20=EC=82=AD?=
=?UTF-8?q?=EC=A0=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/floor-plan/CanvasMenu.jsx | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/components/floor-plan/CanvasMenu.jsx b/src/components/floor-plan/CanvasMenu.jsx
index 63ecdef3..c97907c5 100644
--- a/src/components/floor-plan/CanvasMenu.jsx
+++ b/src/components/floor-plan/CanvasMenu.jsx
@@ -183,7 +183,10 @@ export default function CanvasMenu(props) {
await reloadCanvasStatus(objectNo, pid)
break
case 'surface':
- const modules = canvas.getObjects().filter((module) => module.name === POLYGON_TYPE.MODULE)
+ const modules = canvas
+ .getObjects()
+ .filter((obj) => [POLYGON_TYPE.MODULE_SETUP_SURFACE, POLYGON_TYPE.MODULE, POLYGON_TYPE.OBJECT_SURFACE].includes(obj.name))
+
if (modules.length > 0) {
swalFire({
text: getMessage('module.delete.confirm'),
@@ -194,10 +197,7 @@ export default function CanvasMenu(props) {
const moduleSurfacesArray = canvas
.getObjects()
- .filter(
- (obj) =>
- obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE || obj.name === POLYGON_TYPE.MODULE || obj.name === POLYGON_TYPE.OBJECT_SURFACE,
- )
+ .filter((obj) => [POLYGON_TYPE.MODULE_SETUP_SURFACE, POLYGON_TYPE.MODULE, POLYGON_TYPE.OBJECT_SURFACE].includes(obj.name))
if (moduleSurfacesArray.length > 0) {
// 모듈면 있을 경우 지붕면 할당 다시해야함
@@ -302,7 +302,6 @@ export default function CanvasMenu(props) {
const settingsModalOptions = useRecoilState(settingModalFirstOptionsState)
useEffect(() => {
- console.log(selectedMenu)
if (selectedMenu === 'placement') {
onClickPlacementInitialMenu()
}
From 6b3d0ea6ffcb537e5ab0a03957375c74f575b59d Mon Sep 17 00:00:00 2001
From: "hyojun.choi"
Date: Wed, 5 Mar 2025 13:31:03 +0900
Subject: [PATCH 03/10] =?UTF-8?q?=ED=9A=8C=EB=A1=9C=EA=B5=AC=EC=84=B1?=
=?UTF-8?q?=EC=9D=B4=20=EC=99=84=EB=A3=8C=EB=90=98=EB=A9=B4=20=EC=9D=B4?=
=?UTF-8?q?=EB=8F=99,=20=EB=B3=B5=EC=82=AC=20=EB=B0=8F=20=EC=82=AD?=
=?UTF-8?q?=EC=A0=9C=EA=B0=80=20=EC=95=88=EB=90=98=EB=8F=84=EB=A1=9D=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/module/useModule.js | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/src/hooks/module/useModule.js b/src/hooks/module/useModule.js
index 0896fe04..c6ca9ba3 100644
--- a/src/hooks/module/useModule.js
+++ b/src/hooks/module/useModule.js
@@ -412,6 +412,9 @@ export function useModule() {
}
const moduleColumnRemove = (type) => {
+ if (isFixedModule()) {
+ return
+ }
const activeModule = canvas.getObjects().filter((obj) => canvas.getActiveObjects()[0].id === obj.id)[0]
if (activeModule.circuit) {
swalFire({
@@ -535,6 +538,9 @@ export function useModule() {
}
const moduleRowRemove = (type) => {
+ if (isFixedModule()) {
+ return
+ }
const activeModule = canvas.getObjects().filter((obj) => canvas.getActiveObjects()[0].id === obj.id)[0]
const rowModules = getRowModules(activeModule)
const otherModules = getOtherModules(rowModules)
@@ -651,6 +657,9 @@ export function useModule() {
}
const moduleColumnInsert = (type) => {
+ if (isFixedModule()) {
+ return
+ }
const activeModule = canvas.getObjects().filter((obj) => canvas.getActiveObjects()[0].id === obj.id)[0]
const columnModules = getColumnModules(activeModule)
let otherModules = getOtherModules(columnModules)
@@ -750,7 +759,25 @@ export function useModule() {
setModuleStatisticsData()
}
+ const isFixedModule = () => {
+ const completeSurfaces = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE && obj.isComplete)
+
+ if (completeSurfaces.length > 0) {
+ swalFire({
+ title: getMessage('modal.module.can.not.edit'),
+ type: 'alert',
+ icon: 'error',
+ })
+ return true
+ }
+
+ return false
+ }
+
const muduleRowInsert = (type) => {
+ if (isFixedModule()) {
+ return
+ }
const activeModule = canvas.getObjects().filter((obj) => canvas.getActiveObjects()[0].id === obj.id)[0]
const rowModules = getRowModules(activeModule)
let otherModules = getOtherModules(rowModules)
From 6a18c93fbcd5dc0f5b6cb9359b907ff40815c534 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=8B=9D?=
<43837214+Minsiki@users.noreply.github.com>
Date: Wed, 5 Mar 2025 14:14:55 +0900
Subject: [PATCH 04/10] =?UTF-8?q?=EC=B9=98=EC=88=98=EC=84=A0=20=EB=B3=80?=
=?UTF-8?q?=EA=B2=BD=20=EA=B3=84=EC=82=B0=EC=8B=9D=20=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../modal/dimensionLine/DimensionLineSetting.jsx | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/components/floor-plan/modal/dimensionLine/DimensionLineSetting.jsx b/src/components/floor-plan/modal/dimensionLine/DimensionLineSetting.jsx
index e08bc839..e4807c36 100644
--- a/src/components/floor-plan/modal/dimensionLine/DimensionLineSetting.jsx
+++ b/src/components/floor-plan/modal/dimensionLine/DimensionLineSetting.jsx
@@ -9,7 +9,7 @@ import { canvasState, pitchTextSelector } from '@/store/canvasAtom'
import { defaultSlope } from '@/store/commonAtom'
import { re } from 'mathjs'
import { basicSettingState } from '@/store/settingAtom'
-import { getChonByDegree } from '@/util/canvas-util'
+import { getChonByDegree, getDegreeByChon } from '@/util/canvas-util'
export default function DimensionLineSetting(props) {
const contextPopupPosition = useRecoilValue(contextPopupPositionState)
@@ -106,14 +106,14 @@ export default function DimensionLineSetting(props) {
}
const calculateLength = (originalLength, angle, angle1) => {
- const slope1 = basicSetting.roofAngleSet !== 'slope' ? getChonByDegree(angle) : angle
- const slope2 = basicSetting.roofAngleSet !== 'slope' ? getChonByDegree(angle1 ?? 0) : angle1
if (!angle1) {
- const angleInRadians = slope1 * (Math.PI / 180)
- const result = Math.sqrt(Math.pow(originalLength * Math.tan(angleInRadians), 2) + Math.pow(originalLength, 2))
- console.log(angleInRadians, result)
+ const slope1 = basicSetting.roofAngleSet !== 'slope' ? getDegreeByChon(angle) : angle
+ const result = Math.sqrt(Math.pow(originalLength * Math.tan((getDegreeByChon(slope1) * Math.PI) / 180), 2) + Math.pow(originalLength, 2))
+ console.log(result)
return result
} else {
+ const slope1 = basicSetting.roofAngleSet !== 'slope' ? getChonByDegree(angle) : angle
+ const slope2 = basicSetting.roofAngleSet !== 'slope' ? getChonByDegree(angle1 ?? 0) : angle1
const numerator = Math.sqrt(Math.pow(slope1, 2) + 100 + Math.pow((10 * slope1) / slope2, 2)) * originalLength
const denominator = Math.sqrt(Math.pow((10 * slope1) / slope2, 2) + 100)
const result = numerator / denominator
From 74d5db411de57c5e07a6ce2c5c1630f57cc0ada1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=8B=9D?=
<43837214+Minsiki@users.noreply.github.com>
Date: Wed, 5 Mar 2025 14:15:54 +0900
Subject: [PATCH 05/10] =?UTF-8?q?plans=202=EA=B0=9C=20=EC=9D=B4=EC=83=81?=
=?UTF-8?q?=EC=9D=BC=EB=95=8C=20plan1=20=EC=82=AD=EC=A0=9C=EA=B8=B0?=
=?UTF-8?q?=EB=8A=A5=20=EC=B6=94=EA=B0=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/floor-plan/CanvasLayout.jsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/floor-plan/CanvasLayout.jsx b/src/components/floor-plan/CanvasLayout.jsx
index 22215fd2..43e4388a 100644
--- a/src/components/floor-plan/CanvasLayout.jsx
+++ b/src/components/floor-plan/CanvasLayout.jsx
@@ -39,7 +39,7 @@ export default function CanvasLayout({ children }) {
onClick={() => handleCurrentPlan(plan.id)}
>
{`Plan ${plan.planNo}`}
- {index !== 0 && !pathname.includes('/estimate') && !pathname.includes('/simulator') && (
+ {plans.length > 1 && !pathname.includes('/estimate') && !pathname.includes('/simulator') && (
{
From 7b7b85dddc714ab609123f256c95dde05c6fa48a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=8B=9D?=
<43837214+Minsiki@users.noreply.github.com>
Date: Wed, 5 Mar 2025 14:16:11 +0900
Subject: [PATCH 06/10] =?UTF-8?q?Color=20Picker=20Title=20=EC=82=AD?=
=?UTF-8?q?=EC=A0=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/common/color-picker/ColorPickerModal.jsx | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/components/common/color-picker/ColorPickerModal.jsx b/src/components/common/color-picker/ColorPickerModal.jsx
index 729402a7..94f24f42 100644
--- a/src/components/common/color-picker/ColorPickerModal.jsx
+++ b/src/components/common/color-picker/ColorPickerModal.jsx
@@ -54,7 +54,6 @@ export default function ColorPickerModal(props) {
-
COLOR PICKER
From eb928fc4f2afb0c5a561b03789a56af00efd94b1 Mon Sep 17 00:00:00 2001
From: "hyojun.choi"
Date: Wed, 5 Mar 2025 14:16:19 +0900
Subject: [PATCH 07/10] =?UTF-8?q?length1Ref=20current=EA=B0=80=20=EC=97=86?=
=?UTF-8?q?=EC=9D=84=20=EA=B2=BD=EC=9A=B0=EB=8A=94=20=EC=8B=A4=ED=96=89?=
=?UTF-8?q?=ED=95=98=EC=A7=80=20=EC=95=8A=EB=8A=94=EB=8B=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/hooks/surface/usePlacementShapeDrawing.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/hooks/surface/usePlacementShapeDrawing.js b/src/hooks/surface/usePlacementShapeDrawing.js
index 50f61172..983583ba 100644
--- a/src/hooks/surface/usePlacementShapeDrawing.js
+++ b/src/hooks/surface/usePlacementShapeDrawing.js
@@ -688,8 +688,9 @@ export function usePlacementShapeDrawing(id) {
}
// 포커스가 length1에 있지 않으면 length1에 포커스를 줌
const activeElem = document.activeElement
+
if (activeElem !== length1Ref.current) {
- length1Ref.current.focus()
+ length1Ref.current?.focus()
}
const key = e.key
@@ -698,7 +699,7 @@ export function usePlacementShapeDrawing(id) {
return
}
- const lengthNum = Number(length1Ref.current.value) / 10
+ const lengthNum = Number(length1Ref.current?.value) / 10
if (lengthNum === 0) {
return
}
From e0219bf2ecf8679aa5e03aa71dc7aed099b09717 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=8B=9D?=
<43837214+Minsiki@users.noreply.github.com>
Date: Wed, 5 Mar 2025 14:28:06 +0900
Subject: [PATCH 08/10] =?UTF-8?q?=EB=B0=B0=EC=B9=98=EB=A9=B4=20=EC=B4=88?=
=?UTF-8?q?=EA=B8=B0=EC=84=A4=EC=A0=95=EC=97=90=EC=84=9C=20=EA=B7=B8?=
=?UTF-8?q?=EB=A6=AC=EB=93=9C=20=EA=B4=80=EB=A0=A8=20contextmenu=20?=
=?UTF-8?q?=EB=82=98=EC=98=A4=EB=8A=94=20=EB=B2=84=EA=B7=B8=20=EC=88=98?=
=?UTF-8?q?=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/hooks/useContextMenu.js | 43 -------------------------------------
1 file changed, 43 deletions(-)
diff --git a/src/hooks/useContextMenu.js b/src/hooks/useContextMenu.js
index 97e9cf6c..144272f8 100644
--- a/src/hooks/useContextMenu.js
+++ b/src/hooks/useContextMenu.js
@@ -76,50 +76,7 @@ export function useContextMenu() {
const currentMenuSetting = () => {
switch (selectedMenu) {
- case 'placement':
- setContextMenu([
- [
- {
- id: 'gridMove',
- name: getMessage('modal.grid.move'),
- component: ,
- },
- {
- id: 'gridCopy',
- name: getMessage('modal.grid.copy'),
- component: ,
- },
- {
- id: 'gridColorEdit',
- name: getMessage('modal.grid.color.edit'),
- component: (
-
- ),
- },
- {
- id: 'remove',
- name: getMessage('delete'),
- },
- {
- id: 'removeAll',
- name: getMessage('delete.all'),
- fn: () => {
- removeGrid()
- removeAdsorptionPoint()
- },
- },
- ],
- ])
- break
case 'outline':
- if (['roof', 'auxiliaryLine'].includes(currentObject?.name)) {
- }
break
default:
setContextMenu([])
From ff34dbd28636762be169ed79a559e7243f8f40d9 Mon Sep 17 00:00:00 2001
From: "hyojun.choi"
Date: Wed, 5 Mar 2025 14:29:56 +0900
Subject: [PATCH 09/10] =?UTF-8?q?=EB=B0=B0=EC=B9=98=EB=A9=B4=20=EC=B4=88?=
=?UTF-8?q?=EA=B8=B0=EC=84=A4=EC=A0=95=20=EA=B2=BD=EC=82=AC=20=EC=88=98?=
=?UTF-8?q?=EC=A0=95=20=EC=8B=9C=20=EB=B0=98=EC=98=81=EB=90=98=EB=8F=84?=
=?UTF-8?q?=EB=A1=9D=20=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../modal/placementShape/PlacementShapeSetting.jsx | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/components/floor-plan/modal/placementShape/PlacementShapeSetting.jsx b/src/components/floor-plan/modal/placementShape/PlacementShapeSetting.jsx
index ccf6ed4b..d836147c 100644
--- a/src/components/floor-plan/modal/placementShape/PlacementShapeSetting.jsx
+++ b/src/components/floor-plan/modal/placementShape/PlacementShapeSetting.jsx
@@ -16,6 +16,8 @@ import { globalLocaleStore } from '@/store/localeAtom'
import { onlyNumberInputChange } from '@/util/input-utils'
import { getChonByDegree, getDegreeByChon } from '@/util/canvas-util'
+import { usePolygon } from '@/hooks/usePolygon'
+import { canvasState } from '@/store/canvasAtom'
/**
* 지붕 레이아웃
@@ -38,6 +40,8 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
const [raftCodes, setRaftCodes] = useState([]) /** 서까래 정보 */
const [currentRoof, setCurrentRoof] = useState(null) /** 현재 선택된 지붕재 정보 */
const { closePopup } = usePopup() /** usePopup에서 closePopup 함수 가져오기 */
+ const { drawDirectionArrow } = usePolygon()
+ const canvas = useRecoilValue(canvasState)
const roofRef = {
roofCd: useRef(null),
@@ -236,6 +240,13 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
},
})
+ const roofs = canvas.getObjects().filter((obj) => obj.roofMaterial?.index === 0)
+
+ roofs.forEach((roof) => {
+ roof.roofMaterial = { ...roofInfo }
+ drawDirectionArrow(roof)
+ })
+
/* 저장 후 화면 닫기 */
closePopup(id)
}
From d6031ccb98baa93af0ee179ae1ad327a78de8e2f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=8B=9D?=
<43837214+Minsiki@users.noreply.github.com>
Date: Wed, 5 Mar 2025 14:30:21 +0900
Subject: [PATCH 10/10] =?UTF-8?q?module=20copy=20=EB=B2=84=EA=B7=B8=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/module/useModule.js | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/hooks/module/useModule.js b/src/hooks/module/useModule.js
index c6ca9ba3..e4e783e9 100644
--- a/src/hooks/module/useModule.js
+++ b/src/hooks/module/useModule.js
@@ -362,7 +362,7 @@ export function useModule() {
}
modules.forEach((module) => {
- const { top, left } = getPosotion(module, direction, Number(length) + Number(moduleLength), false)
+ const { top, left } = getPosotion(module, direction, Number(length) + Number(moduleLength), true)
module.clone((obj) => {
obj.set({
parentId: module.parentId,
@@ -689,7 +689,7 @@ export function useModule() {
targetModules.forEach((module) => {
if (width === -1)
width = type === MODULE_INSERT_TYPE.LEFT ? Number(activeModule.left) - Number(module.left) : Number(module.left) - Number(activeModule.left)
- const { top, left } = getPosotion(module, type, module.width, false)
+ const { top, left } = getPosotion(module, type, module.width, true)
module.originPos = {
left: module.left,
top: module.top,
@@ -706,7 +706,7 @@ export function useModule() {
canvas.renderAll()
otherModules = getOtherModules(columnModules)
columnModules.forEach((module) => {
- const { top, left } = getPosotion(module, type, module.width, false)
+ const { top, left } = getPosotion(module, type, module.width, true)
let copyModule = null
module.clone((obj) => {
obj.set({
@@ -807,7 +807,7 @@ export function useModule() {
targetModules.forEach((module) => {
if (height === -1)
height = type === MODULE_INSERT_TYPE.TOP ? Number(activeModule.top) - Number(module.top) : Number(module.top) - Number(activeModule.top)
- const { top, left } = getPosotion(module, type, activeModule.height, false)
+ const { top, left } = getPosotion(module, type, activeModule.height, true)
module.originPos = {
left: module.left,
top: module.top,
@@ -823,7 +823,7 @@ export function useModule() {
canvas.renderAll()
otherModules = getOtherModules(rowModules)
rowModules.forEach((module) => {
- const { top, left } = getPosotion(module, type, activeModule.height, false)
+ const { top, left } = getPosotion(module, type, activeModule.height, true)
let copyModule = null
module.clone((obj) => {
obj.set({