lengthText는 이동 가능하도록 수정

This commit is contained in:
hyojun.choi 2024-10-16 13:21:26 +09:00
parent 40c81d1044
commit ba899a3279
2 changed files with 5 additions and 0 deletions

View File

@ -244,6 +244,9 @@ export function useRoofShapeSetting(setShowRoofShapeSettingModal) {
}
}
// 기존 wallLine 제거
canvas?.remove(canvas.getObjects().filter((obj) => obj.name === 'wallLine'))
const polygon = addPolygonByLines(outerLines, { name: 'wallLine' })
polygon.lines = [...outerLines]

View File

@ -77,6 +77,8 @@ export function useCanvasEvent() {
if (target.name === 'lengthText') {
const x = target.left
const y = target.top
target.lockMovementX = false
target.lockMovementY = false
// Add a property to store the previous value
const previousValue = target.text
target.on('selected', (e) => {