dom-to-image icon indicating copy to clipboard operation
dom-to-image copied to clipboard

Doesn't support tag <use> in SVG images

Open SimchaShats opened this issue 7 years ago • 4 comments

If there is SVG image rendered using tag <use xlinkHref="..."/>(ReacrJS) doesn't exported to the png image.

Browsers

  • [ ] Chrome 49+
  • [ ] Firefox 45+

SimchaShats avatar May 04 '17 12:05 SimchaShats

any updates on this issue ? @SimchaShats

Abdelrahman-Atia avatar Dec 05 '18 13:12 Abdelrahman-Atia

@Abdelrahman-Atia @SimchaShats what is your use case?

I am polishing off some code that will properly handle SVG use tags when the tag points to a symbol definition defined in a SVG document that isnt a child of the one we are capturing. I am curious what you are trying to accomplish so I can try and make my solution more robust.

cnatis avatar Jan 10 '19 19:01 cnatis

In my case, the symbol definition inside the top 'body' element, outside the dom I pass to domtoimage

PTLEI avatar Nov 30 '22 02:11 PTLEI

I patch @cnatis 's commit, it done to me.But it lose the color which set 'currentColor'.It always get the defaultValue (black) instead of the inheritance

PTLEI avatar Nov 30 '22 03:11 PTLEI