From 7c553064b71246128ff712a1ce238ae7d838367d Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Sun, 16 Oct 2022 09:58:46 -0700 Subject: [PATCH] Use ceil for numCols heuristic --- src/components/Timeline.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Timeline.vue b/src/components/Timeline.vue index d6fe343d..b0e7deb4 100644 --- a/src/components/Timeline.vue +++ b/src/components/Timeline.vue @@ -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