From 5e486f1ae494c49b79bdc1ad837f1eea439b06d4 Mon Sep 17 00:00:00 2001 From: sonora Date: Fri, 30 Dec 2016 18:33:53 +0100 Subject: [PATCH] slightly improve isZoomingAllowed --- OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java index 496d7c90d9..22829b74dd 100644 --- a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java +++ b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java @@ -1052,16 +1052,16 @@ public class OsmandMapTileView implements IMapDownloaderCallback { } private boolean isZoomingAllowed(int baseZoom, float dz) { - if (baseZoom > getMaxZoom()) { + if (baseZoom >= getMaxZoom()) { return false; } - if (baseZoom > getMaxZoom() - 1 && dz > 1) { + if (baseZoom >= getMaxZoom() - 1 && dz >= 1) { return false; } - if (baseZoom < getMinZoom()) { + if (baseZoom <= getMinZoom()) { return false; } - if (baseZoom < getMinZoom() + 1 && dz < -1) { + if (baseZoom <= getMinZoom() + 1 && dz <= -1) { return false; } return true;