fabric beta 6.0.0-beta14 How to loadsvgfromurl and add into canvas? #9467
Replies: 2 comments 5 replies
-
Loading in angular 16 sample svg:
|
Beta Was this translation helpful? Give feedback.
-
Actually, I had issues with SVG's. It seems that this did the trick in v6: For some reason, it looks like top and left need to be set in the options when adding it to the group. I've noticed this in another issue I helped resolve (didn't realize this was a thing... just thought it was that one). |
Beta Was this translation helpful? Give feedback.
-
I have used below code but svg not visible on canvas
var canvas = new Canvas("canvas", {
height: 720,
width: 1080,
});
loadSVGFromURL("sampleurl").then((res:any)=>{
let g = new Group(res.objects, res.opts);
canvas.add(g);
canvas.requestRenderAll();
})
Beta Was this translation helpful? Give feedback.
All reactions