Roo/dialog/UploadCropbox.js
[roojs1] / Roo / dialog / UploadCropbox.js
index a5d3e5c..1dcf9f9 100644 (file)
@@ -589,6 +589,8 @@ Roo.extend(Roo.dialog.UploadCropbox, Roo.Component,  {
         console.log("GETSCALELEVEL: " + this.getScaleLevel());
         console.log("width: " + width);
         console.log("height: " + height);
+        console.log("maxWidth: " + maxWidth);
+        console.log("maxHeight: " + maxHeight);
         
         if(
                 this.isDocument &&
@@ -618,9 +620,9 @@ Roo.extend(Roo.dialog.UploadCropbox, Roo.Component,  {
                 !this.isDocument &&
                 (this.rotate == 0 || this.rotate == 180) && 
                 (
-                    (this.imageEl.OriginWidth / this.imageEl.OriginHeight  > this.minWidth / this.minHeight && width < this.minWidth) || 
-                    width > maxWidth || 
-                    (this.imageEl.OriginWidth / this.imageEl.OriginHeight  < this.minWidth / this.minHeight && height < this.minHeight) || 
+                    width < this.minWidth || // zoom out
+                    height < this.minHeight ||
+                    width > maxWidth ||
                     height > maxHeight
                 )
         ){