mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
Fix: min zoom extent is allowed to be negative. (#860)
* Fix: min zoom extent is allowed to be negative. Min and Max Zoom fields are now bound by 0.01 and 200 * Fixed comparison * Version bump * Hash set in index.html
This commit is contained in:
parent
bfba711d8b
commit
409681d89d
3 changed files with 7 additions and 2 deletions
|
|
@ -7817,7 +7817,7 @@
|
|||
<script src="modules/ui/stylePresets.js"></script>
|
||||
|
||||
<script src="modules/ui/general.js?v=1.87.00"></script>
|
||||
<script src="modules/ui/options.js?v=1.87.00"></script>
|
||||
<script src="modules/ui/options.js?v=1.87.09"></script>
|
||||
<script src="main.js"></script>
|
||||
|
||||
<script defer src="modules/relief-icons.js"></script>
|
||||
|
|
|
|||
|
|
@ -461,8 +461,13 @@ function changeDialogsTheme(themeColor, transparency) {
|
|||
}
|
||||
|
||||
function changeZoomExtent(value) {
|
||||
if(+zoomExtentMin.value > +zoomExtentMax.value) {
|
||||
[zoomExtentMin.value, zoomExtentMax.value]=[zoomExtentMax.value, zoomExtentMin.value];
|
||||
}
|
||||
const min = Math.max(+zoomExtentMin.value, 0.01);
|
||||
const max = Math.min(+zoomExtentMax.value, 200);
|
||||
zoomExtentMin.value = min;
|
||||
zoomExtentMax.value = max;
|
||||
zoom.scaleExtent([min, max]);
|
||||
const scale = minmax(+value, 0.01, 200);
|
||||
zoom.scaleTo(svg, scale);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
// version and caching control
|
||||
const version = "1.87.08"; // generator version, update each time
|
||||
const version = "1.87.09"; // generator version, update each time
|
||||
|
||||
{
|
||||
document.title += " v" + version;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue