From 4927ca46897ce8983f92572df12f4d6ea86ca376 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Sat, 28 May 2022 13:07:34 +1000
Subject: Set visible-overflow on just-unhidden tiles

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

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

diff --git a/src/components/Tile.vue b/src/components/Tile.vue
index b53abee..59e0839 100644
--- a/src/components/Tile.vue
+++ b/src/components/Tile.vue
@@ -32,6 +32,7 @@ export default defineComponent({
 			clickHoldTimer: 0, // Used to recognise click-and-hold events
 			scrollOffset: 0, // Used to track scroll offset when displaying with overflow
 			pendingScrollHdlr: 0,
+			justUnhidden: false,
 		};
 	},
 	computed: {
@@ -122,7 +123,8 @@ export default defineComponent({
 				transitionProperty: 'left, top, width, height, visibility',
 				transitionTimingFunction: 'ease-out',
 				zIndex: this.inTransition && this.wasClicked ? '1' : '0',
-				overflow: this.inTransition && !this.isLeaf && !this.hasExpanded ? 'hidden' : 'visible',
+				overflow: (this.inTransition && !this.isLeaf && !this.hasExpanded && !this.justUnhidden) ?
+					'hidden' : 'visible',
 				// CSS variables
 				'--nonleafBgColor': this.nonleafBgColor,
 				'--tileSpacing': this.lytOpts.tileSpacing + 'px',
@@ -310,6 +312,9 @@ export default defineComponent({
 		failFlag(){
 			return this.layoutNode.failFlag;
 		},
+		hidden(){
+			return this.layoutNode.hidden;
+		},
 	},
 	watch: {
 		// For setting transition state (can be triggered externally, like via search and auto-mode)
@@ -344,6 +349,13 @@ export default defineComponent({
 				this.$el.scrollTop = scrollTop;
 			}
 		},
+		//
+		hidden(newVal, oldVal){
+			if (oldVal && !newVal){
+				this.justUnhidden = true;
+				setTimeout(() => {this.justUnhidden = false;}, this.uiOpts.tileChgDuration);
+			}
+		},
 	},
 	methods: {
 		// Click handling
-- 
cgit v1.2.3

