From 716c132b15f3e37a5e0456e65406122324821047 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Thu, 7 Jul 2022 16:51:59 +1000
Subject: Use subAction parameter to simplify action-functions

Stop using @transitionend in Tile, as it seems oddly unreliable (using
@transitioncancel as well didn't help)
---
 src/components/Tile.vue | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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

diff --git a/src/components/Tile.vue b/src/components/Tile.vue
index 0511596..2be6f40 100644
--- a/src/components/Tile.vue
+++ b/src/components/Tile.vue
@@ -1,5 +1,5 @@
 <template>
-<div :style="styles" @transitionend="onTransitionEnd" @scroll="onScroll"> <!-- Need enclosing div for transitions -->
+<div :style="styles" @scroll="onScroll"> <!-- Need enclosing div for transitions -->
 	<div v-if="isLeaf" :class="[hasOneImage ? 'flex' : 'grid', {'hover:cursor-pointer': isExpandableLeaf}]"
 		class="w-full h-full flex-col grid-cols-1" :style="leafStyles"
 		@mouseenter="onMouseEnter" @mouseleave="onMouseLeave" @mousedown="onMouseDown" @mouseup="onMouseUp">
@@ -387,6 +387,7 @@ export default defineComponent({
 				let valChanged = newVal[0] != oldVal[0] || newVal[1] != oldVal[1];
 				if (valChanged && this.uiOpts.transitionDuration > 100 && !this.inTransition){
 					this.inTransition = true;
+					setTimeout(this.onTransitionEnd, this.uiOpts.transitionDuration);
 				}
 			},
 			deep: true,
@@ -396,6 +397,7 @@ export default defineComponent({
 				let valChanged = newVal[0] != oldVal[0] || newVal[1] != oldVal[1];
 				if (valChanged && this.uiOpts.transitionDuration > 100 && !this.inTransition){
 					this.inTransition = true;
+					setTimeout(this.onTransitionEnd, this.uiOpts.transitionDuration);
 				}
 			},
 			deep: true,
-- 
cgit v1.2.3

