QPolygon setViewLengthText 수정

This commit is contained in:
hyojun.choi 2024-09-04 15:21:16 +09:00
parent 3804d612d4
commit 566de9b290
2 changed files with 7 additions and 3 deletions

View File

@ -693,7 +693,10 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, {
this.wall = wall
},
setViewLengthText(isView) {
this.texts.forEach((text) => {
this.canvas
?.getObjects()
.filter((obj) => obj.name === 'lengthText' && obj.parent === this)
.forEach((text) => {
text.set({ visible: isView })
})
},

View File

@ -4605,6 +4605,7 @@ export function useMode() {
})
canvas?.add(trestlePoly)
trestlePoly.setViewLengthText(false)
})
removeHelpPointAndHelpLine()
}