Fixed not supported text-wrap problem
This commit is contained in:
parent
72e5b2071a
commit
73dc865900
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue