Roo/bootstrap/UploadCropbox.js
authoredward <edward@roojs.com>
Fri, 22 Jan 2016 06:48:22 +0000 (14:48 +0800)
committeredward <edward@roojs.com>
Fri, 22 Jan 2016 06:48:22 +0000 (14:48 +0800)
Roo/bootstrap/UploadCropbox.js

index f6b90fb..4bf5f8f 100644 (file)
@@ -437,11 +437,11 @@ Roo.extend(Roo.bootstrap.UploadCropbox, Roo.bootstrap.Component,  {
         
         var context = canvas.getContext("2d");
         
-        context.translate(centerX, centerY);
+//        context.translate(centerX, centerY);
 
-        context.rotate(this.rotate * Math.PI / 180);
+//        context.rotate(this.rotate * Math.PI / 180);
         
-//        context.drawImage(this.image.dom, x, y, cropWidth, cropHeight, centerX * -1, centerY * -1, this.minWidth, this.minHeight);
+        context.drawImage(this.image.dom, x, y, cropWidth, cropHeight, 0, 0, this.minWidth, this.minHeight);
         
         this.cropImageData = canvas.toDataURL(this.cropType);