fix: Fix inconsistency in resizing while maintaining aspect ratio (#9116)
Some checks failed
Auto release excalidraw next / Auto-release-excalidraw-next (push) Has been cancelled
Build Docker image / build-docker (push) Has been cancelled
Cancel previous runs / cancel (push) Has been cancelled
Publish Docker / publish-docker (push) Has been cancelled
New Sentry production release / sentry (push) Has been cancelled

This commit is contained in:
Kyosuke Fujimoto
2025-02-10 23:24:08 +09:00
committed by GitHub
parent c8f4a4cb41
commit c329470b73

View File

@@ -771,8 +771,8 @@ const getResizedOrigin = (
x: x + ((prevWidth - newWidth) / 2) * (Math.cos(angle) + 1),
y:
y +
(newHeight - prevHeight) / 2 +
((prevWidth - newWidth) / 2) * Math.sin(angle),
((prevWidth - newWidth) / 2) * Math.sin(angle) +
(prevHeight - newHeight) / 2,
};
case "west-side":
return {