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
Showing only changes of commit 6b56af6119 - Show all commits

View File

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

View File

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