This commit is contained in:
yoosangwook 2024-12-26 16:04:14 +09:00
commit 90d8e867bd
2 changed files with 12 additions and 2 deletions

View File

@ -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,
}
}

View File

@ -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