Open ghost opened 1 year ago
hi @jonnymura the SVG is a bit weird. The image is a white image, while the mask has the actual graphic on it. fabricJS does not support masks yet ( there is an old PR for that that you could try maybe )
Do you have a single svg with mask or your use case is fully about masks and so you are stuck?
Is there any reason why you want to load this svg as a group of objects rather than a plain image, and in that case it would probably work out of the box?
Telling us a bit more about your use case could help understand what you could actually do
Version
5.2.4
In What environments are you experiencing the problem?
Chrome, Node.js
Node Version (if applicable)
16.10.0
Link To Reproduction
http://jsfiddle.net/jonnyMitts/m8ndkq0h/1/
Steps To Reproduce
I have an svg that uses both a mask and base 64 encoded image. For some reason that combination looks like it causes issues with FabricJS.
Not sure if this is because of the clipping mask in the SVG or the base 64 encoded image, but the images within the svg are coming through with a white clipping image and no base image. Not sure what is going here. Here is the fiddle.
The top image rendering in the browser is the FabricJS rendering on the canvas and the bottom is the browser rendering of the same svg. You can see both by scrolling up and down.
http://jsfiddle.net/jonnyMitts/m8ndkq0h/1/
here is the javascript:
and here is the HTML