Baseline support #317

Closed
woehrl01 wants to merge 33 commits from baseline-support into master
20 changed files with 4602 additions and 7 deletions
Showing only changes of commit b790bf7dba - Show all commits

View File

@@ -958,9 +958,7 @@ static inline YGDirection YGNodeResolveDirection(const YGNodeRef node,
static float YGBaseline(const YGNodeRef node) {
if (node->baseline != NULL) {
const float baseline = node->baseline(node);
if (YGFloatIsUndefined(baseline)) {
return node->layout.measuredDimensions[YGDimensionHeight];
}
YG_ASSERT(!YGFloatIsUndefined(baseline), "Expect custom baseline function to not return NaN")
return baseline;
}