From c42b35d10cda3e4c3127f3a6cb4312d7b6cfe3f6 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Tue, 3 Jan 2023 11:00:23 +1100
Subject: Fix event lines occasionally being off by one unit

---
 src/components/TimeLine.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/components/TimeLine.vue')

diff --git a/src/components/TimeLine.vue b/src/components/TimeLine.vue
index 7dab13b..6595bed 100644
--- a/src/components/TimeLine.vue
+++ b/src/components/TimeLine.vue
@@ -407,7 +407,7 @@ const endIsLastVisible = computed(() => {
 function dateToOffset(date: HistDate){ // Assumes 'date' is >=firstDate and <=lastDate
 	// Find containing major tick
 	let tickIdx = firstIdx.value;
-	for (let i = tickIdx + 1; i < lastIdx.value; i++){
+	for (let i = tickIdx + 1; i <= lastIdx.value; i++){
 		if (ticks.value[i].major){
 			if (!date.isEarlier(ticks.value[i].date)){
 				tickIdx = i;
-- 
cgit v1.2.3

