Roo/dialog/UploadCropbox.js
[roojs1] / Roo / dialog / UploadCropbox.js
index b902e0e..9428b8f 100644 (file)
@@ -560,6 +560,9 @@ Roo.extend(Roo.dialog.UploadCropbox, Roo.Component,  {
         this.startScale = this.scale;
         this.scale = (e.getWheelDelta() == 1) ? (this.scale + 1) : (this.scale - 1);
         
+        console.log('startScale: ' + this.startScale);
+        console.log('scale: ' + this.scale);
+        console.log('getWheelDelta: ' + e.getWheelDelta());
         if(!this.zoomable()){
             this.scale = this.startScale;
             return;
@@ -1053,11 +1056,11 @@ Roo.extend(Roo.dialog.UploadCropbox, Roo.Component,  {
             }
         }
         
-        height = 300;
+        height = 500;
         width = Math.ceil(this.minWidth * height / this.minHeight);
         
         if(this.minWidth > this.minHeight){
-            width = 300;
+            width = 500;
             height = Math.ceil(this.minHeight * width / this.minWidth);
         }
         
@@ -1389,12 +1392,7 @@ Roo.extend(Roo.dialog.UploadCropbox, Roo.Component,  {
         }
         
         this.file = file;
-        if(typeof(file.type) != 'undefined') {
-            console.log("CROPTYPE");
-            console.log(this.cropType);
-            console.log("FILETYPE");
-            console.log(typeof(file.type));
-            console.log(this.file.type);
+        if(typeof(file.type) != 'undefined' && file.type.length != 0) {
             this.cropType = file.type;
         }