This commit is contained in:
Amritesh Kumar 2025-04-11 00:18:53 -04:00 committed by GitHub
commit f6a38d6c2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8632,8 +8632,17 @@ class App extends React.Component<AppProps, AppState> {
if (newElement.type === "freedraw") {
const points = newElement.points;
const dx = pointerCoords.x - newElement.x;
const dy = pointerCoords.y - newElement.y;
let dx = pointerCoords.x - newElement.x;
let dy = pointerCoords.y - newElement.y;
if (shouldRotateWithDiscreteAngle(event)) {
({ width: dx, height: dy } = getLockedLinearCursorAlignSize(
newElement.x,
newElement.y,
pointerCoords.x,
pointerCoords.y,
));
}
const lastPoint = points.length > 0 && points[points.length - 1];
const discardPoint =