From 9e5947680addb448ce844814fb480daeb45142ef Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Tue, 12 Jul 2022 15:27:46 +1000
Subject: Increase adherence to Vue's Style Guide

Make components have multi-word names.
Make all <v-for>s have a 'key' attribute.
Use scoped styles.
Also add sourcemap generation.
---
 src/components/AncestryBar.vue | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

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

diff --git a/src/components/AncestryBar.vue b/src/components/AncestryBar.vue
index 6f2d37c..3cfd116 100644
--- a/src/components/AncestryBar.vue
+++ b/src/components/AncestryBar.vue
@@ -1,6 +1,6 @@
 <template>
 <div :style="styles" @wheel.stop="onWheelEvt">
-	<tile v-for="(node, idx) in dummyNodes" :key="node.name" class="shrink-0"
+	<tol-tile v-for="(node, idx) in dummyNodes" :key="node.name" class="shrink-0"
 		:layoutNode="node" :tolMap="tolMap" :nonAbsPos="true" :lytOpts="lytOpts" :uiOpts="uiOpts"
 		@leaf-click="onTileClick(nodes[idx])" @info-click="onInfoIconClick"/>
 </div>
@@ -8,7 +8,7 @@
 
 <script lang="ts">
 import {defineComponent, PropType} from 'vue';
-import Tile from './Tile.vue';
+import TolTile from './TolTile.vue';
 import {TolMap} from '../tol';
 import {LayoutNode, LayoutOptions} from '../layout';
 import {UiOptions} from '../lib';
@@ -28,7 +28,7 @@ export default defineComponent({
 			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
+		dummyNodes(){ // Childless versions of 'nodes' used to parameterise <tol-tile>s
 			return this.nodes.map(n => {
 				let newNode = new LayoutNode(n.name, []);
 				newNode.dims = [this.imgSz, this.imgSz];
@@ -86,7 +86,7 @@ export default defineComponent({
 	mounted(){
 		this.scrollToEnd();
 	},
-	components: {Tile, },
+	components: {TolTile, },
 	emits: ['ancestor-click', 'info-click', ],
 });
 </script>
-- 
cgit v1.2.3

