Merge pull request '1003 - calcLineActualSize() degree가 undefined => 0 처리' (#28) from feature/ysCha into dev

Reviewed-on: #28
This commit is contained in:
ysCha 2025-04-24 09:51:20 +09:00
commit 88e2c8ed05
2 changed files with 3 additions and 3 deletions

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)