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

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

@@ -148,8 +148,9 @@
 
     function getSourceCanvas(image, data) {
         var canvas = $('<canvas>')[0],
-            context = canvas.getContext('2d'),
-            width = data.naturalWidth,
+            context = canvas.getContext('2d');
+            context.translate(0.5, 0.5);
+        var width = data.naturalWidth,
             height = data.naturalHeight,
             rotate = data.rotate,
             rotated = getRotatedSizes({