Roo/dialog/UploadCropbox.js
authorleon <leon@roojs.com>
Tue, 9 Aug 2022 10:01:19 +0000 (18:01 +0800)
committerleon <leon@roojs.com>
Tue, 9 Aug 2022 10:01:19 +0000 (18:01 +0800)
Roo/dialog/UploadCropbox.js

index 749a651..0384ce7 100644 (file)
@@ -651,7 +651,7 @@ Roo.extend(Roo.dialog.UploadCropbox, Roo.Component,  {
         var paddingRight = this.thumbEl.getLeft(true) + this.thumbEl.getWidth() - newCanvasWidth - newPreviewLeft;
         var paddingBottom = this.thumbEl.getTop(true) + this.thumbEl.getHeight() - newCanvasHeight - newPreviewTop;
 
-        var maxPadding = (newCanvasWidth > newCanvasHeight) ? newCanvasWidth * 0.05 : newCanvasHeight * 0.05;
+        var maxPadding = (newCanvasWidth >= newCanvasHeight) ? newCanvasWidth * 0.05 : newCanvasHeight * 0.05;
 
         console.log("=================================");
         console.log("old canvas width: " + this.canvasEl.width);