Fixed not supported text-wrap problem

This commit is contained in:
BOT Alex 2024-03-31 17:18:58 +02:00
parent 72e5b2071a
commit 73dc865900
1 changed files with 6 additions and 5 deletions

View File

@ -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 @@
<div
class="StartPageAnimated"
id="StartPageAnimated"
bind:this={StartPageAnimated}
style="transform: translate({mouseRelativeScaled.x}px, {mouseRelativeScaled.y}px) translateZ(0) rotate(0.001deg);"
>
@ -170,7 +171,7 @@
display: flex;
justify-content: center;
align-items: center;
text-wrap: nowrap;
white-space:nowrap;
width: 2rem;