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:
2
dist/css-layout.h
vendored
2
dist/css-layout.h
vendored
@@ -613,7 +613,7 @@ static float getDimWithMargin(css_node_t *node, css_flex_direction_t axis) {
|
||||
|
||||
static bool isDimDefined(css_node_t *node, css_flex_direction_t axis) {
|
||||
float value = node->style.dimensions[dim[axis]];
|
||||
return !isUndefined(value) && value > 0.0;
|
||||
return !isUndefined(value) && value >= 0.0;
|
||||
}
|
||||
|
||||
static bool isPosDefined(css_node_t *node, css_position_t position) {
|
||||
|
BIN
dist/css-layout.jar
vendored
BIN
dist/css-layout.jar
vendored
Binary file not shown.
2
dist/css-layout.js
vendored
2
dist/css-layout.js
vendored
@@ -1095,7 +1095,7 @@ var computeLayout = (function() {
|
||||
})();
|
||||
|
||||
// This module export is only used for the purposes of unit testing this file. When
|
||||
// the library is packaged this file is included within css-layout.js which forms
|
||||
// the library is packaged this file is included within css-layout.js which forms
|
||||
// the public API.
|
||||
if (typeof exports === 'object') {
|
||||
module.exports = computeLayout;
|
||||
|
2
dist/css-layout.min.js.map
vendored
2
dist/css-layout.min.js.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user