diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-12-20 17:03:04 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2021-12-20 17:44:01 +0100 |
commit | 72be6e1b168472cf0f2643fe0ba3a09095220312 (patch) | |
tree | 3cb7c2e43e880918549e9b78c8fe8e341c08d40c | |
parent | 90b53acd325487e1975e478be8ac6e11814e257c (diff) | |
download | server-72be6e1b168472cf0f2643fe0ba3a09095220312.tar.gz |
Use ID instead of class for map and mapwrap.
-rw-r--r-- | public/common/client.js | 6 | ||||
-rw-r--r-- | 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; } |