Roo/dialog/UploadCropbox.js
[roojs1] / Roo / dialog / UploadCropbox.js
index 77e24ee..6663249 100644 (file)
@@ -891,13 +891,16 @@ Roo.extend(Roo.dialog.UploadCropbox, Roo.Component,  {
                     var scale = this.outputMaxWidth / canvas.width;
                     canvas.width = canvas.width * scale;
                     canvas.height = canvas.height * scale;
+                    context.fillStyle = 'white';
+                    context.fillRect(0, 0, canvas.width - 100, canvas.height);
                     context.scale(scale, scale);
                 }
+                else {
+                    context.fillStyle = 'white';
+                    context.fillRect(0, 0, canvas.width, canvas.height);
+                }
 
-                context.filLStyle = '#FF0000';
-                context.fillRect(10, 10, 100, 100);
-
-                // context.drawImage(imageCanvas, sx, sy, width, height, x, y, width, height);
+                context.drawImage(imageCanvas, sx, sy, width, height, x, y, width, height);
                 
                 break;
             case 90 :