Skip to content

Commit

Permalink
remove toggle log, try to make it viewable on the phones...
Browse files Browse the repository at this point in the history
  • Loading branch information
Tunguso4ka committed Aug 12, 2024
1 parent 3143c76 commit b6480df
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 15 deletions.
23 changes: 14 additions & 9 deletions css/dark_theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ button {

cursor: pointer;

min-width: 1.5em;
height: 1.5em;
min-width: 2vw;
min-height: 2vw;
padding: 0;
}

Expand All @@ -29,13 +29,10 @@ button:hover {
color: #011627;
}

div {
left: 1%;
position: absolute;
display: flex;

justify-content: center;
vertical-align: middle;
ul {
padding: 0;
margin: 0;
list-style-type: none;
}

[hidden]{
Expand All @@ -44,10 +41,18 @@ div {

.toolbar {
top: 2%;
left: 1%;
position: absolute;
display: flex;

justify-content: center;
vertical-align: middle;
}

#mapsbar {
bottom: 2%;
left: 1%;
position: absolute;
}

.selector {
Expand Down
5 changes: 3 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Map Viewer</title>
<link rel="icon" type="image/x-icon" href="resources/icon.ico">
<link rel="stylesheet" type="text/css" href="css/dark_theme.css"/>
Expand All @@ -27,11 +28,11 @@
onclick="adjustZoom(0.3)"
>-</button>
</div>
<div id="mapsbar" hidden>
<ul id="mapsbar" hidden>
<button class="selector" onclick="map_path='maps/Savannah-0.png'">Savannah</button>
<button class="selector" onclick="map_path='maps/Solaris-0.png'">Solaris</button>
<button class="selector" onclick="map_path='maps/Shiva-0.png'">Shiva</button>
<button class="selector" onclick="map_path='maps/Prison-0.png'">Fiorina</button>
</div>
</ul>
<body/>
</html>
9 changes: 5 additions & 4 deletions scripts/logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,13 @@ function onPointerUp(e)

function onPointerMove(e)
{
if (isDragging)
if (!isDragging)
{
cameraOffset.x = getEventLocation(e).x/cameraZoom - dragStart.x
cameraOffset.y = getEventLocation(e).y/cameraZoom - dragStart.y
return;
}

cameraOffset.x = getEventLocation(e).x/cameraZoom - dragStart.x;
cameraOffset.y = getEventLocation(e).y/cameraZoom - dragStart.y;
}

function handleTouch(e, singleTouchHandler)
Expand Down Expand Up @@ -155,6 +157,5 @@ function adjustZoom(zoomAmount, zoomFactor)
function toggleMapsbarHidden()
{
button = document.getElementById("mapsbar");
console.log(button.hidden)
button.hidden = ! button.hidden;
}

0 comments on commit b6480df

Please sign in to comment.