Baseline support #317
@@ -958,9 +958,7 @@ static inline YGDirection YGNodeResolveDirection(const YGNodeRef node,
|
|||||||
static float YGBaseline(const YGNodeRef node) {
|
static float YGBaseline(const YGNodeRef node) {
|
||||||
if (node->baseline != NULL) {
|
if (node->baseline != NULL) {
|
||||||
const float baseline = node->baseline(node);
|
const float baseline = node->baseline(node);
|
||||||
if (YGFloatIsUndefined(baseline)) {
|
YG_ASSERT(!YGFloatIsUndefined(baseline), "Expect custom baseline function to not return NaN")
|
||||||
return node->layout.measuredDimensions[YGDimensionHeight];
|
|
||||||
}
|
|
||||||
return baseline;
|
return baseline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user