From 964416c0ea73f33576328bb1382382bff664f150 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 30 Apr 2023 00:07:25 +0200 Subject: [PATCH] minor initial position fix --- files/assets/js/marseko.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/assets/js/marseko.js b/files/assets/js/marseko.js index 8b9a185bc5..c181fc864a 100644 --- a/files/assets/js/marseko.js +++ b/files/assets/js/marseko.js @@ -1,10 +1,10 @@ const marsekoEl = document.getElementById("marseko"); function getInitialPosition(max) { - return Math.max(32, Math.floor(Math.random() * max) - 16); + return Math.max(32, Math.floor(Math.random() * max)); } -let marsekoPosX = getInitialPosition(screen.availWidth); -let marsekoPosY = getInitialPosition(screen.availHeight); +let marsekoPosX = getInitialPosition(screen.availWidth - 20); +let marsekoPosY = getInitialPosition(screen.availHeight - 50); marsekoEl.style.left = `${marsekoPosX}px`; marsekoEl.style.top = `${marsekoPosY}px`; let mousePosX = marsekoPosX;