Merge branch 'dev' of ssh://git.jetbrains.space/nalpari/q-cast-iii/qcast-front into qcast-pub

This commit is contained in:
김민식 2025-01-17 13:56:04 +09:00
commit 29021ec9f0

View File

@ -427,12 +427,13 @@ export const usePolygon = () => {
text = '西西南' text = '西西南'
} }
const sameDirectionCnt = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.ROOF && obj.directionText === text) const sameDirectionCnt = canvas.getObjects().filter((obj) => {
const onlyStrDirection = obj.directionText?.replace(/[0-9]/g, '')
return obj.name === POLYGON_TYPE.ROOF && onlyStrDirection === text
})
text = text + (sameDirectionCnt.length + 1) text = text + (sameDirectionCnt.length + 1)
polygon.set('directionText', text) polygon.set('directionText', text)
const textObj = new fabric.Text(`${text} (${currentAngleType === ANGLE_TYPE.SLOPE ? arrow.pitch : getDegreeByChon(arrow.pitch)}${pitchText})`, { const textObj = new fabric.Text(`${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',