From d0091d71cee4fa3b24dd7fea6830fcd96498435a Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Sat, 7 Jan 2023 12:39:36 +1100
Subject: Show events in unit after MAX_DATE tick

Without this, for a MAX_DATE of, say 2000/1/1, at scale 1e9, events
after 1 AD won't be shown.
---
 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 3172e80..13fe662 100644
--- a/src/components/TimeLine.vue
+++ b/src/components/TimeLine.vue
@@ -442,7 +442,7 @@ const idToEvent = computed(() => { // Maps visible event IDs to HistEvents
 	while (itr.data() != null){
 		let event = itr.data()!;
 		itr.next();
-		if (!event.start.isEarlier(lastDate.value)){
+		if (dateToUnit(event.start, scale.value) > dateToUnit(lastDate.value, scale.value)){
 			break;
 		}
 		if ((store.ctgs as {[ctg: string]: boolean})[event.ctg] == false){
-- 
cgit v1.2.3

