Fix justify content + min dimension when children overflow
Reviewed By: gkassabli Differential Revision: D4029442 fbshipit-source-id: d28ebd269c452c3359e16ecc5749a415da6e4d75
This commit is contained in:
parent
72cd12ed13
commit
3e332d9cc8
|
@ -1544,9 +1544,10 @@ static void layoutNodeImpl(const CSSNodeRef node,
|
|||
|
||||
// If we are using "at most" rules in the main axis. Calculate the remaining space when
|
||||
// constraint by the min size defined for the main axis.
|
||||
if (measureModeMainDim == CSSMeasureModeAtMost) {
|
||||
|
||||
if (measureModeMainDim == CSSMeasureModeAtMost && remainingFreeSpace > 0) {
|
||||
if (!CSSValueIsUndefined(node->style.minDimensions[dim[mainAxis]]) && node->style.minDimensions[dim[mainAxis]] >= 0) {
|
||||
remainingFreeSpace = fmaxf(0, node->style.minDimensions[dim[mainAxis]] - (availableInnerMainDim - remainingFreeSpace));
|
||||
remainingFreeSpace = fmax(0, node->style.minDimensions[dim[mainAxis]] - (availableInnerMainDim - remainingFreeSpace));
|
||||
} else {
|
||||
remainingFreeSpace = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue