From 73dc865900c55f3566d1d37bf03de718ed2454b5 Mon Sep 17 00:00:00 2001 From: BOT Alex <44818698+MagicBOTAlex@users.noreply.github.com> Date: Sun, 31 Mar 2024 17:18:58 +0200 Subject: [PATCH] Fixed not supported text-wrap problem --- src/routes/zhen/Comps/TopAnimatedBackground.svelte | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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;