From 89fc34f82956f2410ee7f1d90e03945e10805dda Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Sun, 3 Jul 2022 16:39:12 +1000
Subject: Add styling, mainly for TileInfoModal and Settings

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

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

diff --git a/src/components/AncestryBar.vue b/src/components/AncestryBar.vue
index cf9513f..e7ba8a5 100644
--- a/src/components/AncestryBar.vue
+++ b/src/components/AncestryBar.vue
@@ -26,6 +26,7 @@ export default defineComponent({
 	computed: {
 		imgSz(){
 			return this.breadth - this.lytOpts.tileSpacing - this.uiOpts.scrollGap;
+				// Intentionally omitting extra tileSpacing, to allow for scrollGap with less image shrinkage
 		},
 		dummyNodes(){ // Childless versions of 'nodes' used to parameterise <tile>s
 			return this.nodes.map(n => {
@@ -53,10 +54,10 @@ export default defineComponent({
 	watch: {
 		// Used to scroll to end of bar upon node/screen changes
 		nodes(){
-			this.$nextTick(() => this.scrollToEnd()); // Without timeout, seems to run before new tiles are added
+			this.$nextTick(() => this.scrollToEnd());
 		},
 		vert(){
-			setTimeout(() => this.scrollToEnd(), 0);
+			this.$nextTick(() => this.scrollToEnd());
 		},
 	},
 	methods: {
@@ -67,7 +68,7 @@ export default defineComponent({
 		onInfoIconClick(data: string){
 			this.$emit('info-click', data);
 		},
-		// For converting vertical scroll to horizontal
+		// For converting vertical scrolling to horizontal
 		onWheelEvt(evt: WheelEvent){
 			if (!this.vert && Math.abs(evt.deltaX) < Math.abs(evt.deltaY)){
 				this.$el.scrollLeft -= (evt.deltaY > 0 ? -30 : 30);
-- 
cgit v1.2.3

