Update z-index & initial ball pos

This commit is contained in:
MrLetsplay 2024-07-19 21:32:20 +02:00
parent 8df7ed8d3c
commit 9e06365730
Signed by: mr
SSH Key Fingerprint: SHA256:92jBH80vpXyaZHjaIl47pjRq+Yt7XGTArqQg1V7hSqg
2 changed files with 4 additions and 2 deletions

View File

@ -12,6 +12,7 @@
background-color: red;
padding:10px;
align-self: stretch;
z-index: 1000;
}
.mrFlexBall {
@ -19,4 +20,5 @@
height: 50px;
border-radius: 50%;
background-color: blue;
z-index: 1000;
}

View File

@ -47,8 +47,8 @@ class Flex {
const BALL_SIZE = 50;
let ballPosX = 100;
let ballPosY = 500;
let ballPosX = window.visualViewport.width / 2 - BALL_SIZE / 2;
let ballPosY = window.visualViewport.height - BALL_SIZE - 100;
let collidableElements = document.querySelectorAll("img");
console.log(collidableElements);