diff --git a/lib/zin/wg/think3c/js/v1.js b/lib/zin/wg/think3c/js/v1.js index d6edcd4cc1..de90489c0b 100644 --- a/lib/zin/wg/think3c/js/v1.js +++ b/lib/zin/wg/think3c/js/v1.js @@ -100,6 +100,23 @@ function calculateCardPosition(region) const d = 10; // 间距 const rows = flattenData(region.rows); const rowsCount = rows.length; + + let r = 0; + while (r < rowsCount) + { + let totalWidth = 0; + let validStartRow = -1; + + for(let i = r; i < r + h && i < rowsCount; i++) + { + if(rows[i]?.right) totalWidth += rows[i].right - rows[i].left; + if(totalWidth >= minW) + { + validStartRow = r; + break; + } + } + } } /**