feat: fit map to screen size

This commit is contained in:
Azgaar 2023-11-19 16:51:59 +04:00
parent ada39b47ad
commit 1200b9e60f
8 changed files with 64 additions and 75 deletions

View file

@ -1,12 +1,11 @@
"use strict";
// Module to store general UI functions
// Module to store generic UI functions
// fit full-screen map if window is resized
window.addEventListener("resize", function (e) {
if (stored("mapWidth") && stored("mapHeight")) return;
mapWidthInput.value = window.innerWidth;
mapHeightInput.value = window.innerHeight;
changeMapSize();
fitMapToScreen();
});
if (location.hostname !== "localhost" && location.hostname !== "127.0.0.1") {