Skip to content

Commit

Permalink
fix row max height
Browse files Browse the repository at this point in the history
  • Loading branch information
skrylnikov committed Jul 25, 2021
1 parent ff5068e commit eca31f4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit eca31f4

Please sign in to comment.