I have JSON data with fabric Rect object. When I try to load this JSON data on to fabric canvas with LoadFromJSON, Shapes are loading perfectly but patterns filled in the shapes are not rendering. The patterns are rendered only after clicking on shape.
I have copied my code in fabric Kitchen sink execute module and i tried to execute it. But it is also not working as expected.
My Code:
var jsonD = '{"objects":[{"type":"rect","originX":"center","originY":"center","left":222.92,"top":237,"width":100,"height":100,"fill":{"source":"http://www.convertingquarterly.com/Portals/1/images/industry-news/Brushfoil%20cross-hatch,%20Tru-Stainless%20paaterns.jpg","repeat":"repeat","offsetX":0,"offsetY":0},"overlayFill":null,"stroke":"black","strokeWidth":1,"strokeDashArray":null,"strokeLineCap":"butt","strokeLineJoin":"miter","strokeMiterLimit":10,"scaleX":1,"scaleY":1,"angle":0,"flipX":false,"flipY":false,"opacity":1,"selectable":true,"hasControls":true,"hasBorders":true,"hasRotatingPoint":true,"transparentCorners":true,"perPixelTargetFind":false,"shadow":null,"visible":true,"clipTo":null,"rx":0,"ry":0,"x":0,"y":0}],"background":""}';
canvas.loadFromJSON(jsonD);
canvas.renderAll();
How to solve this problem?