From 409681d89d723784e43866d41938a88b900348e8 Mon Sep 17 00:00:00 2001 From: Leo Date: Thu, 25 Aug 2022 18:16:02 +0200 Subject: [PATCH] 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 --- index.html | 2 +- modules/ui/options.js | 5 +++++ versioning.js | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index c5ff67248..cb29d687c 100644 --- a/index.html +++ b/index.html @@ -7817,7 +7817,7 @@ - + diff --git a/modules/ui/options.js b/modules/ui/options.js index 0683a694d..47cbf60c1 100644 --- a/modules/ui/options.js +++ b/modules/ui/options.js @@ -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); diff --git a/versioning.js b/versioning.js index 80db2aace..e86679694 100644 --- a/versioning.js +++ b/versioning.js @@ -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;