wesmiler 6 年之前
父节点
当前提交
5f11d346c7
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      public/static/weixin/lib/cropper/cropper.js

+ 2 - 2
public/static/weixin/lib/cropper/cropper.js

@@ -162,8 +162,8 @@
             canvas.width = rotated.width;
             canvas.height = rotated.height;
             context.save();
-            context.translate(0.5, 0.5);
-            // context.translate(rotated.width / 2, rotated.height / 2);
+            // context.translate(0.5, 0.5);
+            context.translate(rotated.width / 2, rotated.height / 2);
             context.rotate(rotate * Math.PI / 180);
             context.drawImage(image, -width / 2, -height / 2, width, height);
             context.restore();