Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[confused] formula to make calculate the width of a text box #3437

Closed
courtneyvigo opened this issue Dec 9, 2016 · 5 comments
Closed

[confused] formula to make calculate the width of a text box #3437

courtneyvigo opened this issue Dec 9, 2016 · 5 comments
Labels
🤔 Question User question, similar to Help Wanted or Needs Help. These can be addressed whenever someone has tim

Comments

@courtneyvigo
Copy link

courtneyvigo commented Dec 9, 2016

Hi all :) I am trying to calculate the width of a text box so I can animate a second text box next to the first one, leaving enough space for what ever content is put in the first. How should I go about doing this?

this is what I have so far but its not working. The text just disappears with no errors in the console:

text2.x = text1.textWidth + 500;

@themoonrat
Copy link
Member

text2.x = text1.width + 500;

@staff0rd staff0rd added Domain: API 🤔 Question User question, similar to Help Wanted or Needs Help. These can be addressed whenever someone has tim labels Dec 12, 2016
@courtneyvigo
Copy link
Author

Thank you!

@courtneyvigo
Copy link
Author

Is there a way to add this with y position in one line? Thanks!

@courtneyvigo
Copy link
Author

text1b.position.set((text1a.width + 520), 0)

never mind :)

@lock
Copy link

lock bot commented Feb 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Feb 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🤔 Question User question, similar to Help Wanted or Needs Help. These can be addressed whenever someone has tim
Projects
None yet
Development

No branches or pull requests

3 participants