From d67b35629905b6c26648c7979c28c333664f102f Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Mon, 2 Jan 2023 16:37:52 +1100
Subject: Skip Timeline transitions for all resize events

Previously, skipping was only done upon vertical/horzontal
orientation change. This didn't address cases like maximising the
window without changing orientation, where pre-existing timeline
ticks would animate out-of-sync with new ones.
---
 src/components/TimeLine.vue | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

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

diff --git a/src/components/TimeLine.vue b/src/components/TimeLine.vue
index b50141a..087d504 100644
--- a/src/components/TimeLine.vue
+++ b/src/components/TimeLine.vue
@@ -102,7 +102,6 @@ const width = ref(0);
 const height = ref(0);
 const availLen = computed(() => props.vert ? height.value : width.value);
 const availBreadth = computed(() => props.vert ? width.value : height.value);
-const prevVert = ref(props.vert); // Previous 'vert' value, used for skipping transitions on horz/vert swap
 const mounted = ref(false);
 onMounted(() => {
 	let rootEl = rootRef.value!;
@@ -118,11 +117,8 @@ const resizeObserver = new ResizeObserver((entries) => {
 			width.value = WRITING_MODE_HORZ ? boxSize.inlineSize : boxSize.blockSize;
 			height.value = WRITING_MODE_HORZ ? boxSize.blockSize : boxSize.inlineSize;
 			// Check for horz/vert swap
-			if (props.vert != prevVert.value){
-				skipTransition.value = true;
-				setTimeout(() => {skipTransition.value = false}, 100); // Note: Using nextTick() doesn't work
-				prevVert.value = props.vert;
-			}
+			skipTransition.value = true;
+			setTimeout(() => {skipTransition.value = false}, 100); // Note: Using nextTick() doesn't work
 		}
 	}
 });
-- 
cgit v1.2.3

