Update z-index & initial ball pos
This commit is contained in:
parent
8df7ed8d3c
commit
9e06365730
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user