react-native-remote-svg icon indicating copy to clipboard operation
react-native-remote-svg copied to clipboard

Fix for resizing SVGs which don't have viewBox

Open Meghpal opened this issue 5 years ago • 0 comments

Potential fix for issue #3

As I understood, the SVGs that do not have viewBox cause the image clipping problem. If we add a viewBox that is the same height and width as the SVG, it is possible to resize it with styles. (Assumption: No viewBox must mean the <svg> tag should be having a height and width)

Tested with:

  1. API: https://restcountries.eu SVG flags
  2. The SVG in the aforementioned issue.

Can you please review the fix and see if it's worth anything?

Meghpal avatar Jun 21 '19 09:06 Meghpal