summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-12-20 17:03:04 +0100
committerTor Andersson <tor@ccxvii.net>2021-12-20 17:44:01 +0100
commit72be6e1b168472cf0f2643fe0ba3a09095220312 (patch)
tree3cb7c2e43e880918549e9b78c8fe8e341c08d40c
parent90b53acd325487e1975e478be8ac6e11814e257c (diff)
downloadserver-72be6e1b168472cf0f2643fe0ba3a09095220312.tar.gz
Use ID instead of class for map and mapwrap.
-rw-r--r--public/common/client.js6
-rw-r--r--public/common/grid.css6
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;
}