길이 text 위치 수정

This commit is contained in:
hyojun.choi 2025-02-06 14:00:24 +09:00
parent f194eb603c
commit 7132b4b90e

View File

@ -61,12 +61,18 @@ export const usePolygon = () => {
let left, top
if (line.direction === 'left' || line.direction === 'right') {
if (line.direction === 'right') {
left = (x1 + x2) / 2
top = (y1 + y2) / 2 + 10
} else if (line.direction === 'top' || line.direction === 'bottom') {
} else if (line.direction === 'top') {
left = (x1 + x2) / 2 + 10
top = (y1 + y2) / 2
} else if (line.direction === 'left') {
left = (x1 + x2) / 2
top = (y1 + y2) / 2 - 30
} else if (line.direction === 'bottom') {
left = (x1 + x2) / 2 - 50
top = (y1 + y2) / 2
}
const minX = line.left