Closed anil32 closed 2 years ago
after changing src please do this this.saveableCanvas.drawImage();
Thanks @easyselva it works for me! :D
Actually, reopening to track as an issue. The component should detect the changed image src and update accordingly.
Also Image is overlapping each other
PR to fix this is in the works at #76
@NishantTadvi A working but not the very best fix is to call this.saveableCanvas.drawImage(); as well as alter canvas width or height a little bit through state, this will force canvas to re-render and will be rendering new image without previous image overlapping. Hope this helps !!
I'm receiving CORS error for all the images I tried, the possible reason is that the library tries to fetch image using XMLHttpRequest
or fetch
or some other programmatic method.
What is the possible solution for the same?
I am also getting the same CORS error with some images. For example, an image of a dog like this one doesn't work and gives the following error.
Access to image at 'https://s3.amazonaws.com/cdn-origin-etr.akc.org/wp-content/uploads/2019/12/03202400/Yellow-Labrador-Retriever.jpg' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
at first image , there is no problem but if you try to select another image ant set it with setState, imgSrc not rendered