Fix width being ignored when has a value of 0
8f6a96adbc
added a test in isDimDefined that checks if `value > 0.0`, but unfortunately, it did not faithfully port the JavaScript version which is `value >= 0.0`. Sadly, no test covered this so it went unnoticed.
This commit is contained in:
@@ -2298,6 +2298,17 @@ describe('Layout', function() {
|
||||
);
|
||||
});
|
||||
|
||||
it('should layout node with a 0 width', function() {
|
||||
testLayout(
|
||||
{style: {width: 200}, children: [
|
||||
{style: {width: 0}}
|
||||
]},
|
||||
{width: 200, height: 0, top: 0, left: 0, children: [
|
||||
{width: 0, height: 0, top: 0, left: 0}
|
||||
]}
|
||||
);
|
||||
});
|
||||
|
||||
xit('should stretch a nested child', function() {
|
||||
testLayout(
|
||||
{children: [
|
||||
|
Reference in New Issue
Block a user