rowSizeDelta rounding

cache
Varun Patil 2022-10-15 20:19:17 -07:00
parent 1a960be768
commit 968fb702c0
1 changed files with 8 additions and 2 deletions

View File

@ -701,8 +701,14 @@ export default class Timeline extends Mixins(GlobalMixin, UserConfig) {
// Set row height // Set row height
const row = this.list[rowIdx]; const row = this.list[rowIdx];
rowSizeDelta += jbox.height - row.size; const jH = Math.round(jbox.height);
row.size = jbox.height; const delta = jH - row.size;
// If the difference is too small, it's not worth risking an adjustment
// especially on square layouts on mobile
if (Math.abs(delta) > 5) {
rowSizeDelta += delta;
row.size = jH;
}
// Add the photo to the row // Add the photo to the row
const photo = data[dataIdx]; const photo = data[dataIdx];