From 72be6e1b168472cf0f2643fe0ba3a09095220312 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 20 Dec 2021 17:03:04 +0100 Subject: Use ID instead of class for map and mapwrap. --- public/common/client.js | 6 +++--- public/common/grid.css | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/public/common/client.js b/public/common/client.js index 8046bde..cf23ee4 100644 --- a/public/common/client.js +++ b/public/common/client.js @@ -371,8 +371,8 @@ function toggle_chat() { function zoom_map() { let grid = document.getElementById("grid_center"); - let mapwrap = document.querySelector(".mapwrap"); - let map = document.querySelector(".map"); + let mapwrap = document.getElementById("mapwrap"); + let map = document.getElementById("map"); map.style.transform = null; mapwrap.style.width = null; mapwrap.style.height = null; @@ -390,7 +390,7 @@ function zoom_map() { } function toggle_zoom() { - document.querySelector(".mapwrap").classList.toggle('fit'); + document.getElementById("mapwrap").classList.toggle('fit'); zoom_map(); } diff --git a/public/common/grid.css b/public/common/grid.css index 2692b0a..83f8fa8 100644 --- a/public/common/grid.css +++ b/public/common/grid.css @@ -243,15 +243,15 @@ body.Observer .menu .resign { box-shadow: 1px 1px 5px rgba(0,0,0,0.5); } -.mapwrap { +#mapwrap { margin: 0 auto; } -.mapwrap.fit { +#mapwrap.fit { max-width: 100%; } -.map { +#map { isolation:isolate; transform-origin: 0 0; } -- cgit v1.2.3