Open M-i-k-e-l opened 3 years ago
I'm having the same issue as well. Did you manage to resolve this @M-i-k-e-l ?
Not via code, I think our UX removed some of the layers from the SVG image; however this does not seem like a good solution for all cases.
Bug
An image inside a rect that has a different width\height (and so the image has to be scaled), will be translated within the rect.![image](https://user-images.githubusercontent.com/38354019/116879329-36535680-ac29-11eb-8a48-ea459c388b6f.png)
Expected behavior
If you paste the xml below into a web editor\viewer (example of a viewer), you will get this:![image](https://user-images.githubusercontent.com/38354019/116879254-1d4aa580-ac29-11eb-95dc-2d1206500912.png)
Unexpected behavior
If you use the example below you will get the following (both iOS and Android):
BTW, changing the location of the rectangle will change the translation (this is with
and with ![image](https://user-images.githubusercontent.com/38354019/116879658-934f0c80-ac29-11eb-800d-128332007359.png)
x="20" y="40"
):x="0" y="0"
):So it seems that the rect's location is affecting the translation of the image.
Environment info
React native info output:
Library version: 12.1.1
Steps To Reproduce
modify App.js: add the following to your imports (within
App.js
):Usage within
App.js
:I hope the example is simple enough, please let me know if you require a project as well.