jeudi 13 décembre 2018

canvas is throw error of tainted after LoadFromJson

I am using fabric js version 1.7.22

when image set in a repetitive manner in a rectangle of fabric js, at the first time it will be loaded and saved into JSON using toJSON() and save an image using todataUrl() method, but when cal canvas a loadFromJson method at that time, this canvas not savable, because it throws tainted canvas error.

Please help me,

I already set crossOrigin in a pattern but it not working. and not added in canvas JSON.

I have made one Fiddle For Generate Issue :

[http://jsfiddle.net/Mark_1998/kt387vLc/1/][1]

Steps to generate issue :

click on 'set pattern'

then click on 'save canvas'

then click on 'reload canvas' // load canvas from JSON

then click on 'save canvas' // cause issue of tainted canvas

Aucun commentaire:

Enregistrer un commentaire