Text translating/rendering x/y incorrectly when rotate > 0 from release 5.0.2+
See original GitHub issueUsing react-native-svg 4.6.1:
Using react-native-svg 5.0.2:
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:
- Created 7 years ago
- Reactions:9
- Comments:58 (11 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@msand Yes, the new parser works correctly for me with rotations in the form
rotate(angle, x, y)
🎉Phew, okay thanks! I thought I was going nuts. I’ll use an explicit matrix transform for now. Thanks!