Change zoom min from 0% to 15%, HaggaBasin default 15%

This commit is contained in:
Reditus committed 2026-05-16 14:02:27 +01:00
1 parent b9cf227d92
commit 5a3b0ef2c4
2 files changed
+4 -4

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': 0
'default_zoom': 0.15
}
},
}
+3 -3
View File
@@ -426,10 +426,10 @@
<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="0" max="350" value="50" step="10">
<input type="range" id="zoom-slider" min="15" max="350" value="15" step="10">
<button type="button" id="zoom-in" title="Zoom in">+</button>
</div>
<div class="zoom-readout" id="zoom-readout">50%</div>
<div class="zoom-readout" id="zoom-readout">15%</div>
</section>
<section class="panel-section">
@@ -538,7 +538,7 @@ function setZoom(nextZoom, keepCenter = true) {
const relativeX = oldZoom ? viewportCenterX / oldZoom : 0;
const relativeY = oldZoom ? viewportCenterY / oldZoom : 0;
currentZoom = Math.min(3.5, Math.max(0, 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`;
els.zoomSlider.value = Math.round(currentZoom * 100);