question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Text translating/rendering x/y incorrectly when rotate > 0 from release 5.0.2+

See original GitHub issue

Using react-native-svg 4.6.1:

image

Using react-native-svg 5.0.2:

image

Both using react-native 0.40.0.

Using this code snippet:

export default class rnsvgtest extends Component {
  render() {
    return (
      <View style={styles.container}>
        <ReactText style={styles.welcome}>
          react-native-svg testing
        </ReactText>
        <Svg
          height="300"
          width="300"
        >
          <Text
            fontSize="10"
            x="100"
            y="20"
            rotate="45"
            textAnchor="middle"
          >[100,20]</Text>
          <Text
            fontSize="10"
            x="150"
            y="20"
            rotate="45"
            textAnchor="middle"
          >[150,20]</Text>
          <Text
            fontSize="10"
            x="200"
            y="20"
            rotate="0"
            textAnchor="middle"
          >[200,20]</Text>
          <Text
            fontSize="10"
            x="250"
            y="20"
            rotate="0"
            textAnchor="middle"
          >[250,20]</Text>
        </Svg>
      </View>
    );
  }
}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:9
  • Comments:58 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
boygirlcommented, Nov 14, 2017

@msand Yes, the new parser works correctly for me with rotations in the form rotate(angle, x, y) 🎉

1reaction
boygirlcommented, Nov 9, 2017

Phew, okay thanks! I thought I was going nuts. I’ll use an explicit matrix transform for now. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Text translating/rendering x/y incorrectly when rotate > 0 from ...
I'm on RN 0.39.2 with react-native-svg 4.4.1 but same problem appear..
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found