Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

fix: proportions when rotating

httpjamesmd951c6e777bc
diff --git a/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsx b/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsx
index 86e9673f80..64b83d0799 100644
--- a/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsx
+++ b/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsx
@@ -308,8 +308,15 @@ const ImageEditorOverlay = (props: IProps) => {
image.onload = () => {
// reset the canvas with new dimensions
- canvas.width = image.width;
- canvas.height = image.height;
+ if (angle % 180 === 0) {
+ canvas.width = image.width;
+ canvas.height = image.height;
+ } else {
+ canvas.width = image.height;
+ canvas.height = image.width;
+ }
+ // canvas.width = image.width;
+ // canvas.height = image.height;
// canvas.width = scaledHeight;
// canvas.height = scaledWidth;
// cw = canvas.width;