Skip to content

scale.mode in game config is ignored #5970

Closed
@samme

Description

@samme

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions