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