From 4d6dd52e9912c1f861b4ead830358f225bac9572 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Sat, 5 Mar 2022 15:17:09 +1100
Subject: Prevent overflow and excess space on tile expand and collapse

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

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

diff --git a/src/components/Tile.vue b/src/components/Tile.vue
index f5835c1..84940f0 100644
--- a/src/components/Tile.vue
+++ b/src/components/Tile.vue
@@ -51,10 +51,10 @@ export default {
 <template>
 <div
 	:style="{position: 'absolute', left: x+'px', top: y+'px', width: width+'px', height: height+'px', zIndex: zIdx}"
-	class="transition-[left,top,width,height] duration-300 ease-out border border-stone-900 bg-white">
-	<img v-if="tree.children.length == 0"
-		:src="'/src/assets/' + tree.tolNode.name + '.jpg'" :alt="tree.tolNode.name"
-		class="h-full hover:cursor-pointer" @click="onImgClick"
+	class="transition-[left,top,width,height] duration-300 ease-out border border-stone-900 bg-white overflow-hidden">
+	<div v-if="tree.children.length == 0"
+		:style="{backgroundImage: 'url(/src/assets/' + tree.tolNode.name + '.jpg)'}"
+		class="hover:cursor-pointer w-full h-full bg-cover" @click="onImgClick"
 		/>
 	<div v-else>
 		<div v-if="!hideHeader" :style="{height: this.layoutSys.HEADER_SZ + 'px'}"
-- 
cgit v1.2.3

