src/services/packing.mjs
BeforeProposed
+1−1
66 const groups = [];
77 let offset = 0;
88 for (let index = 0; index < count; index++) {
9 const length = Math.min(maximum, rows.length - offset);
9 const length = size + (index < extra ? 1 : 0);
1010 groups.push(rows.slice(offset, offset + length));
1111 offset += length;
1212 }