Use ceil for numCols heuristic

old-stable24
Varun Patil 2022-10-16 09:58:46 -07:00
parent c758c69c93
commit 3c761136ac
1 changed files with 2 additions and 1 deletions

View File

@ -299,7 +299,7 @@ export default class Timeline extends Mixins(GlobalMixin, UserConfig) {
} else {
// As a heuristic, assume all images are 4:3 landscape
this.rowHeight = DESKTOP_ROW_HEIGHT;
this.numCols = Math.floor(this.rowWidth / (this.rowHeight * 4 / 3));
this.numCols = Math.ceil(this.rowWidth / (this.rowHeight * 4 / 3));
}
}
@ -777,6 +777,7 @@ export default class Timeline extends Mixins(GlobalMixin, UserConfig) {
} else {
// Otherwise just adjust the ticks
this.scrollerManager.adjust();
console.log('adjust', rowSizeDelta, addedRows.length + removedRows.length, day);
}
// Scroll to the same actual position if the added rows