summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/common/client.js17
1 files changed, 15 insertions, 2 deletions
diff --git a/public/common/client.js b/public/common/client.js
index cee9ea5..26f953e 100644
--- a/public/common/client.js
+++ b/public/common/client.js
@@ -335,13 +335,26 @@ function zoom_map() {
}
}
-window.addEventListener('resize', zoom_map);
-
function toggle_zoom() {
document.querySelector(".mapwrap").classList.toggle('fit');
zoom_map();
}
+function init_map_zoom() {
+ window.addEventListener('resize', zoom_map);
+}
+
+function init_shift_zoom() {
+ window.addEventListener("keydown", (evt) => {
+ if (evt.key === "Shift")
+ document.querySelector("body").classList.add("shift");
+ });
+ window.addEventListener("keyup", (evt) => {
+ if (evt.key === "Shift")
+ document.querySelector("body").classList.remove("shift");
+ });
+}
+
function toggle_log() {
document.querySelector(".grid_window").classList.toggle("hide_log");
zoom_map();