From f8481b7c69f1bc2db0a00833ae143910b5f1b6f7 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Thu, 26 Dec 2024 15:34:39 +0900 Subject: [PATCH] =?UTF-8?q?=ED=8E=B8=EB=A5=98=EC=A7=80=EB=B6=95=EC=9D=80?= =?UTF-8?q?=20=EA=B0=81=EB=8F=84=20=ED=91=9C=EC=8B=9C=20=EC=95=88=EB=90=98?= =?UTF-8?q?=EA=B2=8C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/roofcover/useRoofShapeSetting.js | 9 +++++++++ src/hooks/useLine.js | 5 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/hooks/roofcover/useRoofShapeSetting.js b/src/hooks/roofcover/useRoofShapeSetting.js index b6c96c82..82dbf53f 100644 --- a/src/hooks/roofcover/useRoofShapeSetting.js +++ b/src/hooks/roofcover/useRoofShapeSetting.js @@ -193,6 +193,7 @@ export function useRoofShapeSetting(id) { line.attributes = { ...line.attributes, pitch: pitch, + onlyOffset: true, } } }) @@ -215,6 +216,7 @@ export function useRoofShapeSetting(id) { offset: eavesOffset / 10, pitch: pitchRef.current, type: LINE_TYPE.WALLLINE.EAVES, + onlyOffset: true, } } @@ -231,6 +233,7 @@ export function useRoofShapeSetting(id) { offset: eavesOffset / 10, pitch: pitchRef.current, type: LINE_TYPE.WALLLINE.EAVES, + onlyOffset: true, } } @@ -261,6 +264,7 @@ export function useRoofShapeSetting(id) { offset: eavesOffset / 10, pitch: pitchRef.current, type: LINE_TYPE.WALLLINE.EAVES, + onlyOffset: true, } } @@ -277,6 +281,7 @@ export function useRoofShapeSetting(id) { offset: eavesOffset / 10, pitch: pitchRef.current, type: LINE_TYPE.WALLLINE.EAVES, + onlyOffset: true, } } @@ -306,6 +311,7 @@ export function useRoofShapeSetting(id) { offset: eavesOffset / 10, pitch: pitchRef.current, type: LINE_TYPE.WALLLINE.EAVES, + onlyOffset: true, } } @@ -322,6 +328,7 @@ export function useRoofShapeSetting(id) { offset: eavesOffset / 10, pitch: pitchRef.current, type: LINE_TYPE.WALLLINE.EAVES, + onlyOffset: true, } } @@ -352,6 +359,7 @@ export function useRoofShapeSetting(id) { offset: eavesOffset / 10, pitch: pitchRef.current, type: LINE_TYPE.WALLLINE.EAVES, + onlyOffset: true, } } @@ -368,6 +376,7 @@ export function useRoofShapeSetting(id) { offset: eavesOffset / 10, pitch: pitchRef.current, type: LINE_TYPE.WALLLINE.EAVES, + onlyOffset: true, } } diff --git a/src/hooks/useLine.js b/src/hooks/useLine.js index 7bf01a47..5e0978ed 100644 --- a/src/hooks/useLine.js +++ b/src/hooks/useLine.js @@ -86,13 +86,14 @@ export const useLine = () => { const addPitchText = (line) => { removePitchText(line) const { startPoint, endPoint, direction, attributes } = line + const { offset, onlyOffset = false } = attributes let left, top const textStr = currentAngleType === ANGLE_TYPE.SLOPE - ? `${attributes.offset ? attributes.offset * 10 : attributes.width * 10}${attributes.pitch ? '-∠' + attributes.pitch + angleUnit : ''}` - : `${attributes.offset ? attributes.offset * 10 : attributes.width * 10}${attributes.pitch ? '-∠' + getDegreeByChon(attributes.pitch) + angleUnit : ''}` + ? `${attributes.offset ? attributes.offset * 10 : attributes.width * 10}${onlyOffset && attributes.pitch ? '-∠' + attributes.pitch + angleUnit : ''}` + : `${attributes.offset ? attributes.offset * 10 : attributes.width * 10}${onlyOffset && attributes.pitch ? '-∠' + getDegreeByChon(attributes.pitch) + angleUnit : ''}` if (direction === 'top') { left = (startPoint.x + endPoint.x) / 2