mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 19:44:13 +00:00
bottom styling isn't applied when a View is not absolute-positioned
Summary: The new CSSLayout have a wrong calculate for the getRelativePosition. So use the getLeadingPosition will get 0 instead of return undefined. Fix it with using isLeadingPosDefined. Reviewed By: fkgozali Differential Revision: D3640799 fbshipit-source-id: 50d3bd2ea4c0d8bf96ba34297425ba269b0535cd
This commit is contained in:
parent
66514869aa
commit
a06e4b75e4
@ -700,9 +700,8 @@ static void setTrailingPosition(CSSNode* node, CSSNode* child, CSSFlexDirection
|
|||||||
// If both left and right are defined, then use left. Otherwise return
|
// If both left and right are defined, then use left. Otherwise return
|
||||||
// +left or -right depending on which is defined.
|
// +left or -right depending on which is defined.
|
||||||
static float getRelativePosition(CSSNode* node, CSSFlexDirection axis) {
|
static float getRelativePosition(CSSNode* node, CSSFlexDirection axis) {
|
||||||
float lead = getLeadingPosition(node, axis);
|
if (isLeadingPosDefined(node, axis)) {
|
||||||
if (!isUndefined(lead)) {
|
return getLeadingPosition(node, axis);
|
||||||
return lead;
|
|
||||||
}
|
}
|
||||||
return -getTrailingPosition(node, axis);
|
return -getTrailingPosition(node, axis);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user