Fixed zoom jumps on small zoom.
This commit is contained in:
parent
7e27c21496
commit
88f19f2ee5
1 changed files with 4 additions and 5 deletions
|
@ -970,7 +970,7 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
|
|||
baseZoom--;
|
||||
}
|
||||
if (!isZoomingAllowed(baseZoom, dz)) {
|
||||
dz = 0;
|
||||
dz = Math.signum(dz);
|
||||
}
|
||||
zoomToAnimate(baseZoom, dz, true);
|
||||
rotateToAnimate(calcRotate);
|
||||
|
@ -982,13 +982,13 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
|
|||
if (baseZoom > maxZoom) {
|
||||
return false;
|
||||
}
|
||||
if (baseZoom >= maxZoom - 2 && dz > 1) {
|
||||
if (baseZoom > maxZoom - 1 && dz > 1) {
|
||||
return false;
|
||||
}
|
||||
if (baseZoom < minZoom) {
|
||||
return false;
|
||||
}
|
||||
if (baseZoom <= minZoom + 2 && dz < -1) {
|
||||
if (baseZoom < minZoom + 1 && dz < -1) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -1082,5 +1082,4 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
|
|||
public Context getContext() {
|
||||
return activity;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue