-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I have a "hacky" way of doing this, position the text at x:(circleDiameter/2)-(textWidth/2) and for y:(circleDiameter/2)-(fontSize/2) fontSize wouldn't give you the exact height but nudge the values a bit until you visually center your text This is how I've done it in my projects for now but it'd be really nice if there's a textAnchor property |
Beta Was this translation helpful? Give feedback.
-
The previous method is deprecated now, you can use this instead |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
I have a "hacky" way of doing this, position the text at x:(circleDiameter/2)-(textWidth/2) and for y:(circleDiameter/2)-(fontSize/2)
fontSize wouldn't give you the exact height but nudge the values a bit until you visually center your text
This is how I've done it in my projects for now but it'd be really nice if there's a textAnchor property