I'm trying to change canvas background with Pattern:
this.canvas.setBackgroundColor(new fabric.Pattern({source: url, repeat: 'repeat'}),
()=> {
this.canvas.renderAll();
});
I'm using an external url like this: https://cdn.pixabay.com/photo/2016/02/20/02/21/colorful-1211510_960_720.png
The canvas is created and working, but the background image doesn't appear unless I make zoom (in or out) to the canvas, as I do it background appears.
Why do you think that I'm having this problem? Am I doing anything wrong? How could I fix this behaviour?
Aucun commentaire:
Enregistrer un commentaire