From 8687a7fafc1f200dad6eee9b5b7f3c7cdb2572a0 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Sat, 28 Jan 2023 16:04:43 +1100
Subject: Prevent timeline height becoming negative

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

(limited to 'src/App.vue')

diff --git a/src/App.vue b/src/App.vue
index 9dcb08b..bfd2730 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -106,7 +106,7 @@ const timelineWidth = computed(() => {
 });
 const timelineHeight = computed(() => {
 	let baseLineHeight = (store.showBaseLine && !vert.value) ? store.baseLineBreadth : 0;
-	return (contentHeight.value - baseLineHeight) / (vert.value ? 1 : timelines.value.length);
+	return Math.max(1, contentHeight.value - baseLineHeight) / (vert.value ? 1 : timelines.value.length);
 });
 
 function updateAreaDims(){
-- 
cgit v1.2.3

