Commit d51005d3 by doszhang

dos

parent 4587a529
...@@ -96,8 +96,6 @@ $(document).ready(function () { ...@@ -96,8 +96,6 @@ $(document).ready(function () {
$('.page1 .btn-next').on('click', checkInfo); $('.page1 .btn-next').on('click', checkInfo);
$('input[name=btn-upload]').change(function () { $('input[name=btn-upload]').change(function () {
imgInfo = {};
img = '';
$('.hide-block').hide(); $('.hide-block').hide();
$('.show-block').show(); $('.show-block').show();
bindUpload(this, uploadCtx, uploadCanvas, 1, function (img) { bindUpload(this, uploadCtx, uploadCanvas, 1, function (img) {
...@@ -463,8 +461,8 @@ function bindUpload(that, ctx, myCanvas, index, callback, imgInfo) { ...@@ -463,8 +461,8 @@ function bindUpload(that, ctx, myCanvas, index, callback, imgInfo) {
imgInfo.rotation = 0; imgInfo.rotation = 0;
} }
var objectImg = new Image(); var objectImg = new Image();
// objectImg.crossOrigin = "Anonymous"; objectImg.crossOrigin = "Anonymous";
// objectImg.setAttribute('crossOrigin', 'anonymous'); objectImg.setAttribute('crossOrigin', 'anonymous');
console.log(objectImg); console.log(objectImg);
objectImg.onload = function () { objectImg.onload = function () {
if (rotation === 90 || rotation === 270) { if (rotation === 90 || rotation === 270) {
......
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