Cannot update right-aligned text without expanding width of parent container #5979
Labels
🤔 Question
User question, similar to Help Wanted or Needs Help. These can be addressed whenever someone has tim
Yes, I looked at prior related issues: #4341, #4002, #3476
I'd like to create a piece of text, align it to the right of the screen, then update the text, while keeping it aligned to the right of the screen.
Here's my first approach, using
anchor.x = 1
:https://jsfiddle.net/r63ud8yL/1/
Here's my second approach, using
(stage.width - text.width)
, which has the exact same result:https://jsfiddle.net/r63ud8yL/2/
I suppose I could store the original width of
app.stage
and align my text to that, but I would prefer to not need to store that value. It seems to me that there should be a way to get single-line text to "flow" from right to left from a permanent anchor. Am I missing a step?Environment
pixi.js
version: 5.1.0The text was updated successfully, but these errors were encountered: