0

I have tested my svg on web and it works. I've tested other random svgs on my mobile device via react-native-svg and those work. But when I try to use my svg on my mobile device it does not appear.

This is the viewbox:

  viewBox="2028857.351440589 -787179.4505178228 547.942222221056 678.551650970825"

And this is an example of one of the paths:

  <path d="M2029154.308400809,786975.3912845182L2029148.926275119,786995.6898737048" />

I've tried messing around with all the parameters of the SVG component and I haven't been able to figure out why I can't get it to work. Any help would be greatly appreciated.

UPDATE: So I have changed preserveAspectRatio to "none" and now appears on my screen, however, it's all wonky. Changing preserveAspectRatio to xMinYMin meet or xMinYMin slice makes it disappear again

Peter O.
  • 32,158
  • 14
  • 82
  • 96
Charles Pettis
  • 337
  • 1
  • 3
  • 11
  • Your path is a short line that falls outside the svg canvas. And although you translate the line inside the svg canvas you would need a very thick stroke to see the line. – enxaneta Mar 11 '21 at 17:44
  • @enxaneta can you explain why I can see the svg when preserveAspectRatio is set to "none", but not when I try to center it and keep aspect ratio with "xMinYMin" ? – Charles Pettis Mar 11 '21 at 17:57
  • Please edit your question and add a working example – enxaneta Mar 11 '21 at 18:27

0 Answers0