치수 표시 선 1의 자리 0으로 나오는 현상 수정

This commit is contained in:
hyojun.choi 2026-01-08 12:54:00 +09:00
parent 3a3afe9b3b
commit ddd3eaf82a

View File

@ -80,7 +80,7 @@ export const getCenterPoint = (point1, point2) => {
* @returns * @returns
*/ */
export const getDistance = (x1, y1, x2, y2) => { export const getDistance = (x1, y1, x2, y2) => {
return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)).toFixed(0) return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)).toFixed(1)
} }
// polygon의 각 변에 해당 점과 점 사이의 거리를 나타내는 IText를 추가하는 함수 // polygon의 각 변에 해당 점과 점 사이의 거리를 나타내는 IText를 추가하는 함수