Update z-index & initial ball pos
This commit is contained in:
parent
8df7ed8d3c
commit
9e06365730
@ -12,6 +12,7 @@
|
|||||||
background-color: red;
|
background-color: red;
|
||||||
padding:10px;
|
padding:10px;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
|
z-index: 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mrFlexBall {
|
.mrFlexBall {
|
||||||
@ -19,4 +20,5 @@
|
|||||||
height: 50px;
|
height: 50px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background-color: blue;
|
background-color: blue;
|
||||||
|
z-index: 1000;
|
||||||
}
|
}
|
||||||
|
@ -47,8 +47,8 @@ class Flex {
|
|||||||
|
|
||||||
const BALL_SIZE = 50;
|
const BALL_SIZE = 50;
|
||||||
|
|
||||||
let ballPosX = 100;
|
let ballPosX = window.visualViewport.width / 2 - BALL_SIZE / 2;
|
||||||
let ballPosY = 500;
|
let ballPosY = window.visualViewport.height - BALL_SIZE - 100;
|
||||||
|
|
||||||
let collidableElements = document.querySelectorAll("img");
|
let collidableElements = document.querySelectorAll("img");
|
||||||
console.log(collidableElements);
|
console.log(collidableElements);
|
||||||
|
Loading…
Reference in New Issue
Block a user