slightly improve isZoomingAllowed
This commit is contained in:
parent
4ab797b91f
commit
5e486f1ae4
1 changed files with 4 additions and 4 deletions
|
@ -1052,16 +1052,16 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isZoomingAllowed(int baseZoom, float dz) {
|
private boolean isZoomingAllowed(int baseZoom, float dz) {
|
||||||
if (baseZoom > getMaxZoom()) {
|
if (baseZoom >= getMaxZoom()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (baseZoom > getMaxZoom() - 1 && dz > 1) {
|
if (baseZoom >= getMaxZoom() - 1 && dz >= 1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (baseZoom < getMinZoom()) {
|
if (baseZoom <= getMinZoom()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (baseZoom < getMinZoom() + 1 && dz < -1) {
|
if (baseZoom <= getMinZoom() + 1 && dz <= -1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue