Roo/dialog/UploadCropbox.js
[roojs1] / Roo / dialog / UploadCropbox.js
index 72f366b..c01fb62 100644 (file)
@@ -485,7 +485,6 @@ Roo.extend(Roo.dialog.UploadCropbox, Roo.Component,  {
     
     onMouseDown : function(e)
     {   
-        console.log("ON MOUSE DOWN");
         e.stopEvent();
         
         this.dragable = true;
@@ -503,7 +502,6 @@ Roo.extend(Roo.dialog.UploadCropbox, Roo.Component,  {
     
     onMouseMove : function(e)
     {   
-        console.log ("ON MOUSE MOVE");
         e.stopEvent();
         
         if(!this.canvasLoaded){
@@ -564,10 +562,15 @@ 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:" + this.startScale);
+        console.log("TEST SCALE: " + this.startScale);
         if(!this.zoomable()){
             this.scale = this.startScale;
             return;
         }
+
+        console.log("END SCALE: " + this.Scale);
         
         this.draw();
         
@@ -581,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;