Skip to content

Commit

Permalink
Allowed cross origin resource access
Browse files Browse the repository at this point in the history
  • Loading branch information
czarpino committed Jun 25, 2015
1 parent dd73a42 commit 128f8c1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/angular-image-cropper.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
* @returns {string}
*/
function getCroppedImage() {
return image && image.src ? canvas.toDataURL() : null;
return canvas.toDataURL();
}

/**
Expand All @@ -141,6 +141,9 @@
}

image = new Image();

// access cross-origin resource as anonymous
image.crossOrigin = 'Anonymous';
image.src = imageSrc;
image.onload = function () {
reset();
Expand Down

0 comments on commit 128f8c1

Please sign in to comment.