carstenschaefer / DrawerJs

A customizable WYSIWYG HTML canvas editor.
https://www.drawerjs.com
MIT License
556 stars 113 forks source link

fixedBackgroundUrl ignores crossOrigin setting #37

Open chryssalid opened 5 years ago

chryssalid commented 5 years ago

Method loadImageFromUrl creates image without taking into consideration if there was a crossOrigin setting in the options. As the result one will get a security error later if use an image from a different origin.

Proposed solution:

if (options.crossOrigin) { image.crossOrigin = options.crossOrigin; }

after onload set.