diff --git a/src/routes/zhen/Comps/TopAnimatedBackground.svelte b/src/routes/zhen/Comps/TopAnimatedBackground.svelte index 5785653..9ccc3d9 100644 --- a/src/routes/zhen/Comps/TopAnimatedBackground.svelte +++ b/src/routes/zhen/Comps/TopAnimatedBackground.svelte @@ -6,7 +6,7 @@ // Params let mouseMoveScale: number = 0.25; - let targetTextLenght: number = 80; + let targetTextLenght: number = 100; // Site variables let mousePos: Vector2; @@ -19,7 +19,7 @@ let screenCenter: Vector2; - let StartPageAnimated: Element; + let StartPageAnimated: Element | null; let windowRef: Window; function onMouseMoved(event: MouseEvent) { @@ -52,7 +52,7 @@ windowRef.addEventListener("resize", updateDimensions); const RevertToOrigin = () => { - if(navigator.userAgent.search(/gecko/i)>0){ + if(navigator.userAgent.search(/gecko/i)>0 && StartPageAnimated !== null){ StartPageAnimated.classList.add('FirefoxSmoothTranition'); } updateAnimation(new Vector2(windowWidth/2, windowHeight/2)); @@ -60,7 +60,7 @@ document.documentElement.addEventListener('mouseleave', RevertToOrigin) const RemoveFirefoxSmoothTranition = () => { - if(navigator.userAgent.search(/gecko/i)>0){ + if(navigator.userAgent.search(/gecko/i)>0 && StartPageAnimated !== null){ StartPageAnimated.classList.remove('FirefoxSmoothTranition'); } }; @@ -108,6 +108,7 @@
@@ -170,7 +171,7 @@ display: flex; justify-content: center; align-items: center; - text-wrap: nowrap; + white-space:nowrap; width: 2rem;