@ -279,7 +279,6 @@ const getLineData = (fromId, toId) => {
const dy = y2 - y1;
const distance = Math.sqrt(dx * dx + dy * dy);
let rad = Math.atan2(dy, dx);
console.log(rad * (180 / Math.PI))
let deg = rad * (180 / Math.PI) - props.boxPos.rotate
if (deg < 0) deg += 360;
lineData.value = {distance, degree: deg}
@ -62,7 +62,7 @@ function getLocalPositionRelativeToP4(point, rectPoints, rectInfo) {
const y_local = dx * Math.sin(rad) + dy * Math.cos(rad);
const rotate_local = ((point.rotate ?? 0) + rectInfo.angle + 360) % 360;
console.log(rotate_local)
return {
x: Number(x_local.toFixed(2)), y: Number(y_local.toFixed(2)), rotate: Number(rotate_local.toFixed(2))
};
@ -1420,7 +1420,7 @@ const processData = (data) => {
const local = correctDeviation(getLocalPositionRelativeToP4(point, areaPoints.value, rectInfo))
// console.log(local)
boxPos.value = local
}