We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9875460 commit 46dabbbCopy full SHA for 46dabbb
flixel/FlxCamera.hx
@@ -1016,8 +1016,13 @@ class FlxCamera extends FlxBasic
1016
zoom = defaultZoom;
1017
1018
// Use the game dimensions if width / height are <= 0
1019
- this.width = width <= 0 ? Math.ceil(FlxG.width / zoom) : width;
1020
- this.height = height <= 0 ? Math.ceil(FlxG.height / zoom) : height;
+ if (width <= 0)
+ width = Math.ceil(FlxG.width / zoom);
1021
+ if (height <= 0)
1022
+ height = Math.ceil(FlxG.height / zoom);
1023
+
1024
+ this.width = width;
1025
+ this.height = height;
1026
_flashRect = new Rectangle(0, 0, width, height);
1027
1028
flashSprite.addChild(_scrollRect);
0 commit comments