diff --git a/web/src/lib/components/assets/thumbnail/thumbnail.svelte b/web/src/lib/components/assets/thumbnail/thumbnail.svelte index c1108227ac..dd8662172f 100644 --- a/web/src/lib/components/assets/thumbnail/thumbnail.svelte +++ b/web/src/lib/components/assets/thumbnail/thumbnail.svelte @@ -66,7 +66,7 @@
{ const geometry = []; for (let group of assetsGroupByDate) { - geometry.push( - justifiedLayout(group.map(getAssetRatio), { - boxSpacing: 2, - containerWidth: Math.floor(viewportWidth), - containerPadding: 0, - targetRowHeightTolerance: 0.15, - targetRowHeight: 235 - }) - ); + const justifiedLayoutResult = justifiedLayout(group.map(getAssetRatio), { + boxSpacing: 2, + containerWidth: Math.floor(viewportWidth), + containerPadding: 0, + targetRowHeightTolerance: 0.15, + targetRowHeight: 235 + }); + geometry.push({ + ...justifiedLayoutResult, + containerWidth: calculateWidth(justifiedLayoutResult.boxes) + }); } return geometry; })(); @@ -182,6 +184,7 @@

{#if (hoveredDateGroup == dateGroupTitle && isMouseOverGroup) || $selectedGroup.has(dateGroupTitle)}

{/if} - + {dateGroupTitle}

@@ -206,9 +209,8 @@
{#each assetsInDateGroup as asset, index (asset.id)} {@const box = geometry[groupIndex].boxes[index]}