From 789ac9f650b5d27eee638c690cc6b838cc0a757d Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Tue, 24 Dec 2024 10:02:02 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B3=80=EB=B3=84=EB=A1=9C=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=EC=A4=91=20=ED=95=9C=EC=AA=BD=ED=9D=90=EB=A6=84?= =?UTF-8?q?=EC=9D=BC=20=EA=B2=BD=EC=9A=B0=20=ED=95=9C=EC=AA=BD=ED=9D=90?= =?UTF-8?q?=EB=A6=84=EC=9D=98=20pitch=EB=A1=9C=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/roofcover/useRoofShapeSetting.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/hooks/roofcover/useRoofShapeSetting.js b/src/hooks/roofcover/useRoofShapeSetting.js index 69309248..e317ba07 100644 --- a/src/hooks/roofcover/useRoofShapeSetting.js +++ b/src/hooks/roofcover/useRoofShapeSetting.js @@ -185,9 +185,19 @@ export function useRoofShapeSetting(id) { } case 4: { outerLines = canvas.getObjects().filter((obj) => obj.name === 'outerLine') - outerLines.forEach((line) => { - // hideLine(line) - }) + const pitch = outerLines.find((line) => line.attributes.type === LINE_TYPE.WALLLINE.SHED)?.attributes.pitch + // 한쪽흐름일 경우 한쪽흐름의 pitch로 설정 + if (pitch) { + outerLines.forEach((line) => { + if (line.attributes.type === LINE_TYPE.WALLLINE.EAVES) { + line.attributes = { + ...line.attributes, + pitch: pitch, + } + } + }) + } + break }