From e756c80de1cb67e03988815b847288870714e852 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Mon, 20 Jun 2022 23:24:05 +1000
Subject: Prevent ancestry-bar scrollbar overlapping content

---
 src/components/AncestryBar.vue | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

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

diff --git a/src/components/AncestryBar.vue b/src/components/AncestryBar.vue
index a56568c..497c11c 100644
--- a/src/components/AncestryBar.vue
+++ b/src/components/AncestryBar.vue
@@ -25,9 +25,8 @@ export default defineComponent({
 		},
 		styles(): Record<string,string> {
 			return {
-				overflowX: this.vert ? 'hidden' : 'auto',
-				overflowY: this.vert ? 'auto' : 'hidden',
-				maxHeight: '100vh',
+				overflowX: this.vert ? 'hidden' : 'scroll',
+				overflowY: this.vert ? 'scroll' : 'hidden',
 				// For child layout
 				display: 'flex',
 				flexDirection: this.vert ? 'column' : 'row',
@@ -57,7 +56,7 @@ export default defineComponent({
 		onWheelEvt(evt: WheelEvent){
 			// Possibly convert vertical scroll to horizontal
 			if (!this.vert && Math.abs(evt.deltaX) < Math.abs(evt.deltaY)){
-				this.$el.scrollLeft -= (evt.deltaY > 0 ? 30 : -30);
+				this.$el.scrollLeft -= (evt.deltaY > 0 ? -30 : 30);
 			}
 		},
 		scrollToEnd(){
-- 
cgit v1.2.3

