From 131339481100dfe0cb7481699481cc7cbba9d9e3 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Thu, 10 Mar 2022 19:29:59 +1100
Subject: Add script for generating tol JSON from txt file. Significantly
 increase dataset size.

---
 src/components/Tile.vue | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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

diff --git a/src/components/Tile.vue b/src/components/Tile.vue
index 8121608..8437456 100644
--- a/src/components/Tile.vue
+++ b/src/components/Tile.vue
@@ -10,6 +10,9 @@ export default {
 	props: {
 		tree: Object,
 	},
+	computed: {
+		name(){return this.tree.tolNode.name.replaceAll('\'', '\\\'')}
+	},
 	methods: {
 		onImgClick(){
 			this.$emit('tile-clicked', [this.tree]);
@@ -41,7 +44,7 @@ export default {
 		width: tree.w+'px', height: tree.h+'px', zIndex: zIdx, overflow: overFlow}"
 	class="transition-[left,top,width,height] duration-300 ease-out border border-stone-900 bg-white">
 	<div v-if="tree.children.length == 0"
-		:style="{backgroundImage: 'url(\'/src/assets/' + tree.tolNode.name + '.jpg\')'}"
+		:style="{backgroundImage: 'url(\'/src/assets/' + name + '.jpg\')'}"
 		class="hover:cursor-pointer w-full h-full bg-cover" @click="onImgClick"
 		/>
 	<div v-else>
-- 
cgit v1.2.3

