rowSizeDelta rounding

old-stable24
Varun Patil 2022-10-15 20:19:17 -07:00
parent a359070fae
commit 4f256b334a
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
const row = this.list[rowIdx];
rowSizeDelta += jbox.height - row.size;
row.size = jbox.height;
const jH = Math.round(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
const photo = data[dataIdx];