diff --git a/src/index.ts b/src/index.ts index 133903c..2b02715 100644 --- a/src/index.ts +++ b/src/index.ts @@ -89,13 +89,17 @@ export const photoFlexLayout = ( for (let rowId = 0; rowId < path.length - 1; ++rowId) { const row = aspectRatioList.slice(path[rowId], path[rowId + 1]); - const height = calcCommonHeight({ + let height = calcCommonHeight({ aspectRatioList: row, containerWidth: containerWidth - containerPadding.left - containerPadding.right, horizontalBoxSpacing: boxSpacing.horizontal, }); + if (rowId === path.length - 2) { + height = Math.min(height, targetRowHeight * 1.5); + } + let left = containerPadding.left; for (