vault-development / react-native-svg-uri

Render SVG images in React Native from an URL or static file
849 stars 334 forks source link

Fix: Text elements / transform + clipPath attribute added #100

Closed nesc58 closed 5 years ago

nesc58 commented 6 years ago

Hi, here is a fix for the text element.

Commit: bc85a03 I think trim().length should be called instead of trim.length... all strings were filtered out.

Commit: 7f9c13f added textAnchor to improve the alignment of text elements. added transform e.g. to rotate an element added clipPath to define clipping for an element.

Commit: 50ed807 removed unnecessary call of fixYPosition. There is nothing to fix when textAnchor used in the svg.

For me this fix works like a charm.

vintage commented 6 years ago

Thanks a lot, the transform functionality works like a charm! @vault-development any news about merging it into the upstream?

jrob-io commented 6 years ago

Confirming that transform works using:

"react-native": "0.55.3"
"react-native-svg": "^6.3.1"
"react-native-svg-uri": "https://github.com/nesc58/react-native-svg-uri"
robinbiondi commented 6 years ago

Hello there! I would love to see this modification released. Do you think you will merge it ?

matc4 commented 5 years ago

Merged!

cadesalaberry commented 5 years ago

Great! Will you publish a new version on the npm registry anytime soon?