From 1a3a77de7242aba418baa2d8d03081e07c763132 Mon Sep 17 00:00:00 2001 From: Manuel Fuhr Date: Tue, 11 Jan 2022 21:46:13 +0100 Subject: [PATCH] Use initial view as minimal zoom level --- .../main/java/btools/routingapp/BInstallerView.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/brouter-routing-app/src/main/java/btools/routingapp/BInstallerView.java b/brouter-routing-app/src/main/java/btools/routingapp/BInstallerView.java index 8a41b41..ffe75c2 100644 --- a/brouter-routing-app/src/main/java/btools/routingapp/BInstallerView.java +++ b/brouter-routing-app/src/main/java/btools/routingapp/BInstallerView.java @@ -60,11 +60,13 @@ public class BInstallerView extends View { } private void setRatio(float ratio, float focusX, float focusY) { - mat.postScale(ratio, ratio, focusX, focusY); - fitBounds(); - tilesVisible = currentScale() >= SCALE_GRID_VISIBLE; + if (currentScale() * ratio >= 1) { + mat.postScale(ratio, ratio, focusX, focusY); + fitBounds(); + tilesVisible = currentScale() >= SCALE_GRID_VISIBLE; - invalidate(); + invalidate(); + } } private void setScale(float scale, float focusX, float focusY) {