texts 추가

This commit is contained in:
hyojun.choi 2025-03-05 16:29:34 +09:00
parent c8e18bee17
commit 11d9d16ff8

View File

@ -48,6 +48,7 @@ export const usePolygon = () => {
canvas.remove(text) canvas.remove(text)
}) })
const lines = polygon.lines const lines = polygon.lines
polygon.texts = []
lines.forEach((line, i) => { lines.forEach((line, i) => {
const length = line.getLength() const length = line.getLength()
@ -102,7 +103,7 @@ export const usePolygon = () => {
parent: polygon, parent: polygon,
name: 'lengthText', name: 'lengthText',
}) })
polygon.texts.push(text)
canvas.add(text) canvas.add(text)
}) })