π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
fix: don't allow resizing in invalid conditions
httpjamesm133c21c0cf2f
diff --git a/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsx b/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsxindex ba8bfa9beb..439a6f0600 100644--- a/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsx+++ b/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsx@@ -367,6 +367,29 @@ const ImageEditorOverlay = (props: IProps) => {// allow 10px toleranceconst tolerance = 10;if (+ x >+ bottomRightCornerOfCanvas.x -+ tolerance &&+ x <+ bottomRightCornerOfCanvas.x ++ tolerance &&+ y >+ bottomRightCornerOfCanvas.y -+ tolerance &&+ y <+ bottomRightCornerOfCanvas.y ++ tolerance+ ) {+ setIsResizing(true);+ setMouseDownX(event.clientX);+ setMouseDownY(event.clientY);+ setOriginalCanvasHeight(+ canvas.height+ );+ setOriginalCanvasWidth(+ canvas.width+ );+ } else if (x <bottomRightCornerOfCanvas.x -tolerance ||@@ -375,16 +398,10 @@ const ImageEditorOverlay = (props: IProps) => {tolerance) {setIsDragging(true);- } else {- setIsResizing(true);}-- setMouseDownX(event.clientX);- setMouseDownY(event.clientY);- setOriginalCanvasHeight(canvas.height);- setOriginalCanvasWidth(canvas.width);}}onMouseUp={(event) => {+ if (!isDragging && !isResizing) return;setIsResizing(false);setIsDragging(false);const context =