Commit 098d3b0e by doszhang

dos

parent b815760a
...@@ -460,20 +460,20 @@ function bindUpload(that, ctx, myCanvas, index, callback, imgInfo) { ...@@ -460,20 +460,20 @@ function bindUpload(that, ctx, myCanvas, index, callback, imgInfo) {
default: default:
imgInfo.rotation = 0; imgInfo.rotation = 0;
} }
var objectImg = new Image(); img = new Image();
objectImg.crossOrigin = "Anonymous"; img.crossOrigin = "Anonymous";
objectImg.setAttribute('crossOrigin', 'anonymous'); img.setAttribute('crossOrigin', 'anonymous');
console.log(img); console.log(img);
objectImg.onload = function () { img.onload = function () {
if (rotation === 90 || rotation === 270) { if (rotation === 90 || rotation === 270) {
width = objectImg.height; width = img.height;
height = objectImg.width; height = img.width;
} }
console.log(objectImg); console.log(img);
drawImage(ctx, myCanvas, objectImg, imgInfo); drawImage(ctx, myCanvas, img, imgInfo);
} }
callback(objectImg); callback(img);
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment