Roo/dialog/UploadCropbox.js
[roojs1] / Roo / dialog / UploadCropbox.js
index fd5ae28..a9f69a9 100644 (file)
@@ -563,14 +563,14 @@ Roo.extend(Roo.dialog.UploadCropbox, Roo.Component,  {
         this.startScale = this.scale;
         this.scale = (e.getWheelDelta() == 1) ? (this.scale + 1) : (this.scale - 1);
         
-        console.log("START SCALE:" . startScale);
-        console.log("TEST SCALE: " . startScale);
+        console.log("START SCALE:" . this.startScale);
+        console.log("TEST SCALE: " . this.startScale);
         if(!this.zoomable()){
             this.scale = this.startScale;
             return;
         }
 
-        console.log("END SCALE: " . endScale);
+        console.log("END SCALE: " . this.Scale);
         
         this.draw();
         
@@ -584,10 +584,15 @@ Roo.extend(Roo.dialog.UploadCropbox, Roo.Component,  {
         if(this.minWidth < this.minHeight){
             minScale = this.thumbEl.getHeight() / this.minHeight;
         }
+
+        console.log("MINSCALE: " + minScale);
         
         var width = Math.ceil(this.imageEl.OriginWidth * this.getScaleLevel() / minScale);
         var height = Math.ceil(this.imageEl.OriginHeight * this.getScaleLevel() / minScale);
 
+        console.log("WIDTH: " + width);
+        console.log("HEIGHT: " + height);
+
         var maxWidth = this.imageEl.OriginWidth;
         var maxHeight = this.imageEl.OriginHeight;