fix potential bug in isZoomingAllowed

This commit is contained in:
Hardy 2016-12-31 08:40:55 +01:00 committed by GitHub
parent 42e956b0de
commit 7960850def

View file

@ -1055,13 +1055,13 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
if (baseZoom > getMaxZoom()) {
return false;
}
if (baseZoom > getMaxZoom() - 1 && dz >= 1) {
if (baseZoom > getMaxZoom() - 1 && dz > 0) {
return false;
}
if (baseZoom < getMinZoom()) {
return false;
}
if (baseZoom < getMinZoom() + 1 && dz <= -1) {
if (baseZoom < getMinZoom() + 1 && dz < 0) {
return false;
}
return true;