Set HaggaBasin as hardcoded default map, 5% zoom, slider min 5%

This commit is contained in:
Reditus committed 2026-05-16 14:53:20 +01:00
1 parent 692c673ab3
commit c06660ae5a
2 files changed
+6 -10

No files matched your search

+1 -1
View File
@@ -98,7 +98,7 @@ DEFAULTS = {
},
'flip_y': False,
'image_size': {'width': 8000, 'height': 8000},
'default_zoom': 1.0
'default_zoom': 0.05
}
},
}
+5 -9
View File
@@ -426,7 +426,7 @@
<h3 class="panel-title">Zoom</h3>
<div class="map-controls">
<button type="button" id="zoom-out" title="Zoom out">-</button>
<input type="range" id="zoom-slider" min="15" max="350" value="100" step="10">
<input type="range" id="zoom-slider" min="5" max="350" value="100" step="10">
<button type="button" id="zoom-in" title="Zoom in">+</button>
</div>
<div class="zoom-readout" id="zoom-readout">100%</div>
@@ -470,17 +470,13 @@ const mapImageUrls = {
{% endfor %}
};
let currentMap = "{{ default_map }}";
let currentMap = "HaggaBasin";
let currentZoom = 0;
let defaultZoom = 0.15;
let defaultZoom = 0.05;
let activeMarkerId = null;
const enabledTypes = { player: true, vehicle: true, base: true };
if (!mapOptions.some(map => map.key === currentMap) && mapOptions.length) {
currentMap = mapOptions[0].key;
}
const mapDefaultZoom = (mapOptions.find(m => m.key === currentMap) || mapOptions[0] || {}).default_zoom || 0.15;
const mapDefaultZoom = 0.05;
currentZoom = mapDefaultZoom;
defaultZoom = mapDefaultZoom;
@@ -536,7 +532,7 @@ function setZoom(nextZoom, keepCenter = true) {
const map = selectedMapConfig();
if (!map) return;
currentZoom = Math.min(3.5, Math.max(0.15, nextZoom));
currentZoom = Math.min(3.5, Math.max(0.05, nextZoom));
els.canvas.style.width = `${map.width * currentZoom}px`;
els.canvas.style.height = `${map.height * currentZoom}px`;