From f09bfa345519f7d070ae9c7474ef8b4f91b22bae Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Thu, 20 Oct 2022 12:55:09 +1100
Subject: Add basic abbreviation for displayed dates

Remove scroll direction reversal in horizontal mode
Fix some linting errors
---
 src/components/TimeLine.vue | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

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

diff --git a/src/components/TimeLine.vue b/src/components/TimeLine.vue
index 89e7057..5aec9b2 100644
--- a/src/components/TimeLine.vue
+++ b/src/components/TimeLine.vue
@@ -33,7 +33,7 @@
 		<text v-for="date, idx in ticks.dates" :key="date.toInt()"
 			x="0" y="0" :text-anchor="vert ? 'start' : 'middle'" dominant-baseline="middle"
 			:fill="store.color.textDark" :style="tickLabelStyles(idx)" class="text-sm animate-fadein">
-			{{date}}
+			{{date.toDisplayString()}}
 		</text>
 		<!-- Main line (unit horizontal line that gets transformed, with extra length to avoid gaps when panning) -->
 		<line :stroke="store.color.alt" stroke-width="2px" x1="-1" y1="0" x2="2" y2="0" :style="mainlineStyles"/>
@@ -895,9 +895,6 @@ function onPointerUp(evt: PointerEvent){
 }
 function onWheel(evt: WheelEvent){
 	let shiftDir = evt.deltaY > 0 ? 1 : -1;
-	if (!props.vert){
-		shiftDir *= -1;
-	}
 	panTimeline(shiftDir * store.scrollRatio);
 }
 function onShiftWheel(evt: WheelEvent){
-- 
cgit v1.2.3

