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

Bug: fixedWidth and fixedHeight does not change the size of Text object #4424

Closed
rexrainbow opened this issue Mar 13, 2019 · 1 comment
Closed

Comments

@rexrainbow
Copy link
Contributor

Version

  • Phaser Version: 3.16.2
  • Browser: Chrome/firefox

Description

Parameters fixedWidth and fixedHeight will change the size of Text object only in method Text.setFixedSize(width, height) (set width, set height).
It won't change the size of text if fixedWidth and fixedHeight are passed in the configuration of creating this Text object, like

var gameObject = scene.add.text(x, y, text, {
    // ...
    fixedWidth: 200,
    fixedHeight: 50
    // ...
});

(BTW, the width and height of this text object will be 1 in this case.)

Example Test Code

codepen, see the result in console.

@photonstorm
Copy link
Collaborator

Thanks for opening this issue, and for submitting a PR to fix it. We have merged your PR into the master branch and attributed the work to you in the Change Log. If you need to tweak the code for whatever reason please submit a new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants