jtiscione / ripple

JQuery plugin for a ripple effect
MIT License
8 stars 3 forks source link

Image violated Cross-Origin policy message #3

Open arnaldop opened 7 years ago

arnaldop commented 7 years ago

Assume user knew what they were doing when they chose that image, and that image displays fine without ripple effect.

A better end-user experience would be to not display an error message and to hide the canvas so that the original image hidden behind it shows.

Even if the original image doesn't display properly, at least the ripple module cannot be blamed for displaying a blank canvas, since it will be the original image that will be blank! :)

Great module, BTW!!!

arnaldop commented 7 years ago

This might suffice in the image.onload function. Haven't been able to test yet.

    catch (e) {
        //window.alert("Aw, snap! Background lorempixel.com image violated Cross-Origin policy.");
        canvas.style.display="none";
        return;
    }