diff --git a/src/hooks/useLine.js b/src/hooks/useLine.js index b447d4f0..21fd9aa5 100644 --- a/src/hooks/useLine.js +++ b/src/hooks/useLine.js @@ -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() diff --git a/src/util/qpolygon-utils.js b/src/util/qpolygon-utils.js index 34bc2320..2705b546 100644 --- a/src/util/qpolygon-utils.js +++ b/src/util/qpolygon-utils.js @@ -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)