Compare commits

..

No commits in common. "1c2bb7147a5453964df2b4be04ef7f004aa0e128" and "043f9a6befadd60fe85fe84f8f6ca15f97f3c206" have entirely different histories.

2 changed files with 5 additions and 9 deletions

View File

@ -47,12 +47,12 @@ export function useCanvasConfigInitialize() {
offsetTexts.forEach((obj) => { offsetTexts.forEach((obj) => {
let text = `${!obj.originText ? '' : obj.originText}` let text = `${!obj.originText ? '' : obj.originText}`
if (!obj.onlyOffset) { if (!obj.onlyOffset) {
text = text + `-∠${obj.roofAngle ?? getDegreeByChon(obj.pitch)}${angleUnit}` text = text + `-∠${getDegreeByChon(obj.pitch)}${angleUnit}`
} }
obj.set({ text: text }) obj.set({ text: text })
}) })
flowTexts.forEach((obj) => { flowTexts.forEach((obj) => {
obj.set({ text: `${!obj.originText ? '' : obj.originText + '-'}${obj.roofAngle ?? getDegreeByChon(obj.pitch)}${pitchText}` }) obj.set({ text: `${!obj.originText ? '' : obj.originText + '-'}${getDegreeByChon(obj.pitch)}${pitchText}` })
}) })
} }

View File

@ -333,7 +333,6 @@ export const usePolygon = () => {
moduleCompass: polygon.moduleCompass, moduleCompass: polygon.moduleCompass,
visible: isFlowDisplay, visible: isFlowDisplay,
pitch: polygon.roofMaterial?.pitch ?? 4, pitch: polygon.roofMaterial?.pitch ?? 4,
roofAngle: polygon.roofMaterial?.angle,
parentId: polygon.id, parentId: polygon.id,
}) })
arrow.setViewLengthText(false) arrow.setViewLengthText(false)
@ -349,7 +348,7 @@ export const usePolygon = () => {
const drawDirectionStringToArrow2 = (polygon, showDirectionText) => { const drawDirectionStringToArrow2 = (polygon, showDirectionText) => {
let { direction, surfaceCompass, moduleCompass, arrow } = polygon let { direction, surfaceCompass, moduleCompass, arrow } = polygon
if (moduleCompass === null || moduleCompass === undefined) { if (moduleCompass === null || moduleCompass === undefined) {
const textObj = new fabric.Text(`${currentAngleType === ANGLE_TYPE.SLOPE ? arrow.pitch : (arrow.roofAngle ?? getDegreeByChon(arrow.pitch))}${pitchText}`, { const textObj = new fabric.Text(`${currentAngleType === ANGLE_TYPE.SLOPE ? arrow.pitch : getDegreeByChon(arrow.pitch)}${pitchText}`, {
fontFamily: flowFontOptions.fontFamily.value, fontFamily: flowFontOptions.fontFamily.value,
fontWeight: flowFontOptions.fontWeight.value.toLowerCase().includes('bold') ? 'bold' : 'normal', fontWeight: flowFontOptions.fontWeight.value.toLowerCase().includes('bold') ? 'bold' : 'normal',
fontStyle: flowFontOptions.fontWeight.value.toLowerCase().includes('italic') ? 'italic' : 'normal', fontStyle: flowFontOptions.fontWeight.value.toLowerCase().includes('italic') ? 'italic' : 'normal',
@ -358,7 +357,6 @@ export const usePolygon = () => {
originX: 'center', originX: 'center',
originY: 'center', originY: 'center',
pitch: arrow.pitch, pitch: arrow.pitch,
roofAngle: arrow.roofAngle,
name: 'flowText', name: 'flowText',
selectable: false, selectable: false,
left: arrow.stickeyPoint.x, left: arrow.stickeyPoint.x,
@ -492,7 +490,7 @@ export const usePolygon = () => {
text = text + (sameDirectionCnt.length + 1) text = text + (sameDirectionCnt.length + 1)
polygon.set('directionText', text) polygon.set('directionText', text)
const textObj = new fabric.Text( const textObj = new fabric.Text(
`${showDirectionText && text} (${currentAngleType === ANGLE_TYPE.SLOPE ? arrow.pitch : (arrow.roofAngle ?? getDegreeByChon(arrow.pitch))}${pitchText})`, `${showDirectionText && text} (${currentAngleType === ANGLE_TYPE.SLOPE ? arrow.pitch : getDegreeByChon(arrow.pitch)}${pitchText})`,
{ {
fontFamily: flowFontOptions.fontFamily.value, fontFamily: flowFontOptions.fontFamily.value,
fontWeight: flowFontOptions.fontWeight.value.toLowerCase().includes('bold') ? 'bold' : 'normal', fontWeight: flowFontOptions.fontWeight.value.toLowerCase().includes('bold') ? 'bold' : 'normal',
@ -500,7 +498,6 @@ export const usePolygon = () => {
fontSize: flowFontOptions.fontSize.value, fontSize: flowFontOptions.fontSize.value,
fill: flowFontOptions.fontColor.value, fill: flowFontOptions.fontColor.value,
pitch: arrow.pitch, pitch: arrow.pitch,
roofAngle: arrow.roofAngle,
originX: 'center', originX: 'center',
originY: 'center', originY: 'center',
name: 'flowText', name: 'flowText',
@ -710,7 +707,7 @@ export const usePolygon = () => {
const addTextByArrows = (arrows, txt, canvas) => { const addTextByArrows = (arrows, txt, canvas) => {
arrows.forEach((arrow, index) => { arrows.forEach((arrow, index) => {
// const textStr = `${txt}${index + 1} (${currentAngleType === ANGLE_TYPE.SLOPE ? arrow.pitch : getDegreeByChon(arrow.pitch)}${pitchText})` // const textStr = `${txt}${index + 1} (${currentAngleType === ANGLE_TYPE.SLOPE ? arrow.pitch : getDegreeByChon(arrow.pitch)}${pitchText})`
const textStr = `${txt} (${currentAngleType === ANGLE_TYPE.SLOPE ? arrow.pitch : (arrow.roofAngle ?? getDegreeByChon(arrow.pitch))}${pitchText})` const textStr = `${txt} (${currentAngleType === ANGLE_TYPE.SLOPE ? arrow.pitch : getDegreeByChon(arrow.pitch)}${pitchText})`
const text = new fabric.Text(`${textStr}`, { const text = new fabric.Text(`${textStr}`, {
fontFamily: flowFontOptions.fontFamily.value, fontFamily: flowFontOptions.fontFamily.value,
@ -719,7 +716,6 @@ export const usePolygon = () => {
fontSize: flowFontOptions.fontSize.value, fontSize: flowFontOptions.fontSize.value,
fill: flowFontOptions.fontColor.value, fill: flowFontOptions.fontColor.value,
pitch: arrow.pitch, pitch: arrow.pitch,
roofAngle: arrow.roofAngle,
originX: 'center', originX: 'center',
originY: 'center', originY: 'center',
name: 'flowText', name: 'flowText',