Skip to content

Commit 2443748

Browse files
committed
Fixed static function phaserjs#4992
1 parent ba4be02 commit 2443748

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

src/tilemaps/const.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,27 +56,33 @@ var CONST = {
5656
* Get the Tilemap orientation from the given string.
5757
*
5858
* @name Phaser.Tilemaps.fromOrientationString
59-
* @const
6059
* @type {function}
6160
* @since 3.50.0
61+
*
62+
* @param {string} [orientation] - The orientation type as a string.
63+
*
64+
* @return {Phaser.Types.Tilemaps.TilemapOrientationType} The Tilemap Orientation type.
6265
*/
6366
fromOrientationString: function (orientation)
6467
{
65-
var constor = CONST.ORTHOGONAL;
68+
orientation = orientation.toLowerCase;
6669

6770
if (orientation === 'isometric')
6871
{
69-
constor = CONST.ISOMETRIC;
72+
return CONST.ISOMETRIC;
7073
}
7174
else if (orientation === 'staggered')
7275
{
73-
constor = CONST.STAGGERED;
76+
return CONST.STAGGERED;
7477
}
7578
else if (orientation === 'hexagonal')
7679
{
77-
constor = CONST.HEXAGONAL;
80+
return CONST.HEXAGONAL;
81+
}
82+
else
83+
{
84+
return CONST.ORTHOGONAL;
7885
}
79-
return constor;
8086
}
8187

8288
};

0 commit comments

Comments
 (0)