diff --git a/app/config.py b/app/config.py index daeb03d..02fa62e 100644 --- a/app/config.py +++ b/app/config.py @@ -85,7 +85,7 @@ DEFAULTS = { }, 'flip_y': False, 'image_size': {'width': 8000, 'height': 8000}, - 'default_zoom': 1.0 + 'default_zoom': 0.15 }, 'HaggaBasin': { 'image': 'maps/HaggaBasin_8k.webp', @@ -98,7 +98,7 @@ DEFAULTS = { }, 'flip_y': False, 'image_size': {'width': 8000, 'height': 8000}, - 'default_zoom': 0.05 + 'default_zoom': 0.15 } }, } diff --git a/templates/map.html b/templates/map.html index d3ee697..377d23a 100644 --- a/templates/map.html +++ b/templates/map.html @@ -426,7 +426,7 @@

Zoom

- +
100%
@@ -472,11 +472,11 @@ const mapImageUrls = { let currentMap = "HaggaBasin"; let currentZoom = 0; -let defaultZoom = 0.05; +let defaultZoom = 0.15; let activeMarkerId = null; const enabledTypes = { player: true, vehicle: true, base: true }; -const mapDefaultZoom = 0.05; +const mapDefaultZoom = 0.15; currentZoom = mapDefaultZoom; defaultZoom = mapDefaultZoom; @@ -532,7 +532,7 @@ function setZoom(nextZoom, keepCenter = true) { const map = selectedMapConfig(); if (!map) return; - currentZoom = Math.min(3.5, Math.max(0.05, nextZoom)); + currentZoom = Math.min(3.5, Math.max(0.15, nextZoom)); els.canvas.style.width = `${map.width * currentZoom}px`; els.canvas.style.height = `${map.height * currentZoom}px`; @@ -542,7 +542,12 @@ function setZoom(nextZoom, keepCenter = true) { function renderChoices() { els.choices.innerHTML = ''; - mapOptions.forEach(map => { + const sortedMaps = [...mapOptions].sort((a, b) => { + if (a.key === 'HaggaBasin') return -1; + if (b.key === 'HaggaBasin') return 1; + return 0; + }); + sortedMaps.forEach(map => { const button = document.createElement('button'); button.type = 'button'; button.className = `map-choice${map.key === currentMap ? ' active' : ''}`;