Skip to content

armgit / ente

Public Imported from GitHub
0

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

feat: max height and width

httpjamesm2164d23107dc
diff --git a/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsx b/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsx
index 2988c94246..dafe1a39f7 100644
--- a/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsx
+++ b/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsx
@@ -298,10 +298,10 @@ const ImageEditorOverlay = (props: IProps) => {
image.onload = () => {
// reset the canvas with new dimensions
- // canvas.width = scaledWidth;
- // canvas.height = scaledHeight;'
- canvas.width = scaledHeight;
- canvas.height = scaledWidth;
+ canvas.width = image.width;
+ canvas.height = image.height;
+ // canvas.width = scaledHeight;
+ // canvas.height = scaledWidth;
// cw = canvas.width;
// ch = canvas.height;
// canvas.style.height = `${ch}px`;
@@ -362,13 +362,11 @@ const ImageEditorOverlay = (props: IProps) => {
ref={canvasRef}
// height={originalHeight}
// width={originalWidth}
- style={
- {
- // maxWidth: '100%',
- // maxHeight: '100%',
- // transform: `translate(${cropOffsetX}px, ${cropOffsetY}px)`,
- }
- }
+ style={{
+ maxWidth: '100%',
+ maxHeight: '1000px',
+ // transform: `translate(${cropOffsetX}px, ${cropOffsetY}px)`,
+ }}
/>
</Box>
</Box>