Roo/dialog/UploadCropbox.js
authorleon <leon@roojs.com>
Tue, 12 Jul 2022 02:50:18 +0000 (10:50 +0800)
committerleon <leon@roojs.com>
Tue, 12 Jul 2022 02:50:18 +0000 (10:50 +0800)
Roo/dialog/UploadCropbox.js

index 27a7d91..fcb98e9 100644 (file)
@@ -899,31 +899,31 @@ Roo.extend(Roo.dialog.UploadCropbox, Roo.Component,  {
                 console.log("X: " + x);
                 console.log("Y: " + y);
                 
-                var targetWidth = this.minWidth - 2 * x;
-                var targetHeight = this.minHeight - 2 * y;
+                // var targetWidth = this.minWidth - 2 * x;
+                // var targetHeight = this.minHeight - 2 * y;
 
-                console.log("targetWidth: " + targetWidth);
-                console.log("targetHeight: " + targetHeight);
+                // console.log("targetWidth: " + targetWidth);
+                // console.log("targetHeight: " + targetHeight);
                 
-                var scale = 1;
+                // var scale = 1;
                 
-                if((x == 0 && y == 0) || (x == 0 && y > 0)){
-                    scale = targetWidth / width;
-                }
+                // if((x == 0 && y == 0) || (x == 0 && y > 0)){
+                //     scale = targetWidth / width;
+                // }
                 
-                if(x > 0 && y == 0){
-                    scale = targetHeight / height;
-                }
+                // if(x > 0 && y == 0){
+                //     scale = targetHeight / height;
+                // }
                 
-                if(x > 0 && y > 0){
-                    scale = targetWidth / width;
+                // if(x > 0 && y > 0){
+                //     scale = targetWidth / width;
                     
-                    if(width < height){
-                        scale = targetHeight / height;
-                    }
-                }
+                //     if(width < height){
+                //         scale = targetHeight / height;
+                //     }
+                // }
 
-                console.log("scale: " + scale);
+                // console.log("scale: " + scale);
                 
                 context.scale(scale, scale);