1003 - calcLineActualSize() degree가 undefined => 0 처리 #28
@ -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()
|
||||||
|
|||||||
@ -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)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user