1003 - calcLineActualSize() degree가 undefined => 0 처리 #28

Merged
ysCha merged 1 commits from feature/ysCha into dev 2025-04-24 09:51:20 +09:00
2 changed files with 3 additions and 3 deletions

View File

@ -53,8 +53,8 @@ export const useLine = () => {
}) })
canvas canvas
?.getObjects() ?.getObjects()
.find((obj) => obj.parentId === line.id) ?.find((obj) => obj.parentId === line.id)
.set({ ?.set({
visible: true, visible: true,
}) })
canvas?.renderAll() canvas?.renderAll()

View File

@ -3527,7 +3527,7 @@ export const calcLinePlaneSize = (points) => {
* @param degree * @param degree
* @returns number * @returns number
*/ */
export const calcLineActualSize = (points, degree) => { export const calcLineActualSize = (points, degree = 0) => {
const { x1, y1, x2, y2 } = points const { x1, y1, x2, y2 } = points
const planeSize = calcLinePlaneSize(points) const planeSize = calcLinePlaneSize(points)
let height = Big(Math.tan(Big(degree).times(Math.PI / 180))).times(planeSize) let height = Big(Math.tan(Big(degree).times(Math.PI / 180))).times(planeSize)