From 7cdd3ae45c2544b239d85174d536fa641f01cf38 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Wed, 9 Mar 2022 23:32:04 +1100
Subject: Re-position headers for parent-area-using tile-groups

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

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

diff --git a/src/components/Tile.vue b/src/components/Tile.vue
index 7af5583..8121608 100644
--- a/src/components/Tile.vue
+++ b/src/components/Tile.vue
@@ -45,7 +45,8 @@ export default {
 		class="hover:cursor-pointer w-full h-full bg-cover" @click="onImgClick"
 		/>
 	<div v-else>
-		<div v-if="tree.headerSz > 0" :style="{height: tree.headerSz+'px'}"
+		<div v-if="(tree.headerSz && !tree.sideArea) || (tree.sideArea && tree.sideArea.sweptLeft)"
+			:style="{height: tree.headerSz+'px'}"
 			class="text-center hover:cursor-pointer bg-stone-300" @click="onHeaderClick">
 			{{tree.tolNode.name}}
 		</div>
@@ -53,10 +54,13 @@ export default {
 			:style="{position: 'absolute', left: tree.sideArea.x+'px', top: tree.sideArea.y+'px',
 				width: (tree.sideArea.w + (tree.sideArea.sweptLeft ? tree.sideArea.extraSz : 0))+'px',
 				height: (tree.sideArea.h + (tree.sideArea.sweptLeft ? 0 : tree.sideArea.extraSz))+'px',
-				borderWidth: tree.sideArea.w > 0 ? '1px' : '0',
 				borderRightColor: (tree.sideArea.sweptLeft ? 'white' : 'currentColor'),
 				borderBottomColor: (tree.sideArea.sweptLeft ? 'currentColor' : 'white')}"
 			class="transition-[left,top,width,height] duration-300 ease-out border border-stone-900 bg-white">
+			<div v-if="!tree.sideArea.sweptLeft" :style="{height: tree.headerSz+'px'}"
+				class="text-center hover:cursor-pointer bg-stone-300" @click="onHeaderClick">
+				{{tree.tolNode.name}}
+			</div>
 			<tile v-for="child in tree.sideChildren" :key="'SIDE_' + child.tolNode.name" :tree="child"
 				@tile-clicked="onInnerTileClicked" @header-clicked="onInnerHeaderClicked"
 				></tile>
-- 
cgit v1.2.3

