-
Notifications
You must be signed in to change notification settings - Fork 7.1k
GridAlign doesn't work when only height parameter set #5019
Copy link
Copy link
Closed
Description
Version
- Phaser Version: ^3.22.0
- Operating system: Windows 10 Home Single Language | Version 1903
- Browser: Chrome
Description
Phaser.Actions.GridAlign doesn't work when you only set height property as following.
Phaser.Actions.GridAlign(group.getChildren(), {
height: 10,
cellWidth: 32,
cellHeight: 32,
x: 100,
y: 100
}); // this doesn't work
it's working when we only set width property like following:
Phaser.Actions.GridAlign(group.getChildren(), {
width: 10,
cellWidth: 32,
cellHeight: 32,
x: 100,
y: 100
}); // this does work
I'm not sure this is the expected behaviour.
Example Test Code
You can test it on labs this example. just try to remove width first and left height alone.
When you do the revers way set width and remove height it's working.
Additional Information
I believe this should work both way. Isn't it? :)
On the code we are already checking if there are properties (width and height) and storing them as
var widthSet = options.hasOwnProperty('width');
var heightSet = options.hasOwnProperty('height');
Is it possible to use these flag's as if we are gonna consider setting by width and/or height?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels