From 98629c3daeca9aab8f57561012463d4ed8636e43 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Fri, 27 May 2022 20:52:33 +1000
Subject: Prevent first root tile transition

Avoids having it move in from top-left when tree data is loaded
---
 src/components/Tile.vue | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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

diff --git a/src/components/Tile.vue b/src/components/Tile.vue
index 021db32..b53abee 100644
--- a/src/components/Tile.vue
+++ b/src/components/Tile.vue
@@ -16,6 +16,7 @@ export default defineComponent({
 		lytOpts: {type: Object as PropType<LayoutOptions>, required: true},
 		uiOpts: {type: Object, required: true},
 		// Other
+		skipTransition: {type: Boolean, default: false},
 		nonAbsPos: {type: Boolean, default: false},
 			// For a leaf node, prevents usage of absolute positioning (used by AncestryBar)
 		overflownDim: {type: Number, default: 0},
@@ -117,7 +118,7 @@ export default defineComponent({
 				boxShadow: this.boxShadow,
 				borderRadius: this.uiOpts.borderRadius + 'px',
 				// Transition related
-				transitionDuration: this.uiOpts.tileChgDuration + 'ms',
+				transitionDuration: (this.skipTransition ? 0 : this.uiOpts.tileChgDuration) + 'ms',
 				transitionProperty: 'left, top, width, height, visibility',
 				transitionTimingFunction: 'ease-out',
 				zIndex: this.inTransition && this.wasClicked ? '1' : '0',
-- 
cgit v1.2.3

