C++ style enums 11/N: Align (#1395)
Summary: X-link: https://github.com/facebook/react-native/pull/39497 Pull Request resolved: https://github.com/facebook/yoga/pull/1395 Moves internal usages of YGAlign to Align bypass-github-export-checks Changelog: [Internal] Reviewed By: rshest Differential Revision: D49337511 fbshipit-source-id: bb9906fcd22780d2cfd8d1360ef69f66b9701bb6
This commit is contained in:
committed by
Facebook GitHub Bot
parent
61763e7d0a
commit
5bf81b1ef8
@@ -41,7 +41,7 @@ float calculateBaseline(const yoga::Node* node) {
|
||||
if (child->getStyle().positionType() == YGPositionTypeAbsolute) {
|
||||
continue;
|
||||
}
|
||||
if (resolveChildAlignment(node, child) == YGAlignBaseline ||
|
||||
if (resolveChildAlignment(node, child) == Align::Baseline ||
|
||||
child->isReferenceBaseline()) {
|
||||
baselineChild = child;
|
||||
break;
|
||||
@@ -64,14 +64,14 @@ bool isBaselineLayout(const yoga::Node* node) {
|
||||
if (isColumn(node->getStyle().flexDirection())) {
|
||||
return false;
|
||||
}
|
||||
if (node->getStyle().alignItems() == YGAlignBaseline) {
|
||||
if (node->getStyle().alignItems() == Align::Baseline) {
|
||||
return true;
|
||||
}
|
||||
const auto childCount = node->getChildCount();
|
||||
for (size_t i = 0; i < childCount; i++) {
|
||||
auto child = node->getChild(i);
|
||||
if (child->getStyle().positionType() != YGPositionTypeAbsolute &&
|
||||
child->getStyle().alignSelf() == YGAlignBaseline) {
|
||||
child->getStyle().alignSelf() == Align::Baseline) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user