File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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} ;
You can’t perform that action at this time.
0 commit comments