Skip to content

Commit

Permalink
Mobile fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Logboy2000 committed Feb 9, 2025
1 parent dc32e92 commit aa9cd07
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
11 changes: 7 additions & 4 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const locationData = [
[2522, 2071, 'images/screenshots/50.png'],
[1970, 1835, 'images/screenshots/51.png'],
[2910, 1745, 'images/screenshots/52.png'],
// [0, 0, 'images/screenshots/53.png'],
[2893, 1634, 'images/screenshots/53.png'],
// [0, 0, 'images/screenshots/54.png'],
// [0, 0, 'images/screenshots/55.png'],
// [0, 0, 'images/screenshots/56.png'],
Expand Down Expand Up @@ -199,7 +199,7 @@ function updateGuessPos() {
}
}

function toggleFullscreen(){
function toggleFullscreen() {
if (mapContainer.classList.contains('fullscreen')) {
mapContainer.classList.remove('fullscreen');
} else {
Expand All @@ -213,15 +213,18 @@ function addEventListeners() {
var dragStart = { x: 0, y: 0 }
var hasMoved = false

fullscreenButton.addEventListener('click', function(){
fullscreenButton.addEventListener('click', function () {
toggleFullscreen()
})

document.addEventListener('keypress', function (event) {
if (event.code === 'Space') {
guessButtonClicked()
}
if (event.key === 'f'){
if (event.key === 'f') {
toggleFullscreen()
}
if(event.key === 'Escape'){
toggleFullscreen()
}
})
Expand Down
10 changes: 6 additions & 4 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,13 @@ p {


#mapContainer {

background-color: #000000;
transition: all 0.3s ease-in-out;
position: absolute;
width: 20%;
height: 30%;
inset: auto 0 1rem auto;
width: 30%;
height: auto;
right: 0;
bottom: 0;
margin: 1rem;
Expand All @@ -96,7 +98,7 @@ p {

#mapContainer:hover {
width: 50%;
height: 70%;
height: auto;
}

#mapCanvas {
Expand All @@ -108,7 +110,7 @@ p {
#buttonContainer {
display: flex;
justify-content: space-between;
width: 100%;
width: 70%;
padding: 0.5rem;
}

Expand Down

0 comments on commit aa9cd07

Please sign in to comment.