Roo/dialog/UploadCropbox.js
[roojs1] / Roo / dialog / UploadCropbox.js
index 2b766fc..85137b6 100644 (file)
@@ -888,12 +888,12 @@ Roo.extend(Roo.dialog.UploadCropbox, Roo.Component,  {
                 sy = sy < 0 ? 0 : (sy / this.getScaleLevel());
 
                 context.fillStyle = 'white';
-                context.fillRect(0, 0, canvas.width, canvas.height);
 
                 if(canvas.width > this.outputMaxWidth) {
                     var scale = this.outputMaxWidth / canvas.width;
                     canvas.width = canvas.width * scale;
                     canvas.height = canvas.height * scale;
+                    context.fillRect(0, 0, canvas.width, canvas.height);
                     context.scale(scale, scale);
                 }