fix: adjust grid-algorithm to reposition from less columns

This commit is contained in:
Meier Lukas committed 2025-11-29 23:59:26 +01:00
1 parent 813a91cb01
commit d8b278d716
2 files changed
+7 -7

No files matched your search

@@ -56,8 +56,7 @@ export const generateResponsiveGridFor = ({
dynamicSectionHeightMap.set(dynamicSection.id, result.height);
}
// Return same positions for items in the current section
if (width >= previousWidth) {
if (width === previousWidth) {
return {
height: Math.max(...itemsOfCurrentSection.map((item) => item.yOffset + item.height)),
items: newItems.concat(normalizedItems),
@@ -99,11 +99,12 @@ qlllmmmmmnnrrrst
ulllmmmmmnnrrrvw
xyz äö`;
// Just add two empty columns to the right
const eighteenColumns = sixteenColumns
.split("\n")
.map((line, index) => (index === 0 ? line : `${line} `))
.join("\n");
const eighteenColumns = `
abbccccddddeeefghi
jbbccccddddeeeklll
mmmmmnnopqseeetlll
mmmmmnnrrruvwxylll
mmmmmnnrrrzäö `;
const tenColumns = `
abbcccceee