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

scale.mode in game config is ignored #5970

Closed
samme opened this issue Jan 8, 2022 · 1 comment
Closed

scale.mode in game config is ignored #5970

samme opened this issue Jan 8, 2022 · 1 comment

Comments

@samme
Copy link
Contributor

samme commented Jan 8, 2022

Version

  • Phaser Version: v3.60.0-beta.4 (063e8c7)

Description

If you create a game with a config value in scale.mode the value is ignored.

Example Test Code

new Phaser.Game({
  scale: {
    mode: Phaser.Scale.FIT,
    width: 800,
    height: 600
  },
  callbacks: {
    postBoot: function (game) {
      console.assert(
        game.scale.scaleMode === Phaser.Scale.FIT,
        "Expected scaleMode %s but got %s",
        Phaser.Scale.FIT,
        game.scale.scaleMode
      );
    }
  }
});

Additional Information

The problem is in

https://github.com/photonstorm/phaser/blob/08bc8284938546afbd67b4745fa924727745c867/src/core/Config.js#L76

because the desired properties are in scaleConfig.mode or config.scaleMode but not scaleConfig.scaleMode.

@photonstorm
Copy link
Collaborator

Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.

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

No branches or pull requests

2 participants