Roo/dialog/UploadCropbox.js
[roojs1] / Roo / dialog / UploadCropbox.js
index 211513a..33b41d7 100644 (file)
@@ -561,9 +561,6 @@ Roo.extend(Roo.dialog.UploadCropbox, Roo.Component,  {
         
         this.startScale = this.scale;
         this.scale = (e.getWheelDelta() > 0) ? (this.scale + 1) : (this.scale - 1);
-
-        console.log("START SCALE: " + this.startScale);
-        console.log("TEST SCALE: " + this.scale);
         
         if(!this.zoomable()){
             this.scale = this.startScale;
@@ -586,11 +583,6 @@ Roo.extend(Roo.dialog.UploadCropbox, Roo.Component,  {
         
         var width = Math.ceil(this.imageEl.OriginWidth * this.getScaleLevel() / minScale);
         var height = Math.ceil(this.imageEl.OriginHeight * this.getScaleLevel() / minScale);
-
-        // console.log("IMAGE WIDTH: " + width);
-        // console.log("IMAGE HEIGHT: " + height);
-        console.log("WINDOW WIDTH: " + this.thumbEl.getWidth() / this.getScaleLevel());
-        console.log("WINDOW HEIGHT: " + this.thumbEl.getHeight() / this.getScaleLevel());
  
         var maxWidth = this.imageEl.OriginWidth;
         var maxHeight = this.imageEl.OriginHeight;
@@ -895,6 +887,11 @@ Roo.extend(Roo.dialog.UploadCropbox, Roo.Component,  {
                 sx = sx < 0 ? 0 : (sx / this.getScaleLevel());
                 sy = sy < 0 ? 0 : (sy / this.getScaleLevel());
 
+                context.filLStyle = '#FF0000';
+                console.log(canvas.width);
+                console.log(canvas.height);
+                context.fillRect(0, 0, canvas.width, canvas.height);
+
                 if(canvas.width > this.outputMaxWidth) {
                     var scale = this.outputMaxWidth / canvas.width;
                     canvas.width = canvas.width * scale;