Merge pull request #4366 from osmandapp/disable_animations
Disable anim in move and zoom
This commit is contained in:
commit
26672bc1d7
1 changed files with 5 additions and 4 deletions
|
@ -212,8 +212,9 @@ public class AnimateDraggingMapThread {
|
|||
}
|
||||
final float mMoveX = rb.getPixXFromLatLon(startLat, startLon) - rb.getPixXFromLatLon(finalLat, finalLon);
|
||||
final float mMoveY = rb.getPixYFromLatLon(startLat, startLon) - rb.getPixYFromLatLon(finalLat, finalLon);
|
||||
|
||||
final float animationTime = Math.max(450, (Math.abs(mStX) + Math.abs(mStY)) / 1200f * MOVE_MOVE_ANIMATION_TIME);
|
||||
|
||||
final boolean doNotUseAnimations = tileView.getSettings().DO_NOT_USE_ANIMATIONS.get();
|
||||
final float animationTime = doNotUseAnimations ? 0 : Math.max(450, (Math.abs(mStX) + Math.abs(mStY)) / 1200f * MOVE_MOVE_ANIMATION_TIME);
|
||||
|
||||
startThreadAnimating(new Runnable() {
|
||||
|
||||
|
@ -221,7 +222,7 @@ public class AnimateDraggingMapThread {
|
|||
public void run() {
|
||||
setTargetValues(endZoom, finalLat, finalLon);
|
||||
if(moveZoom != startZoom){
|
||||
animatingZoomInThread(startZoom, startZoomFP, moveZoom, startZoomFP,ZOOM_MOVE_ANIMATION_TIME, notifyListener);
|
||||
animatingZoomInThread(startZoom, startZoomFP, moveZoom, startZoomFP, doNotUseAnimations ? 0 : ZOOM_MOVE_ANIMATION_TIME, notifyListener);
|
||||
}
|
||||
|
||||
if(!stopped){
|
||||
|
@ -232,7 +233,7 @@ public class AnimateDraggingMapThread {
|
|||
}
|
||||
|
||||
if (!stopped && (moveZoom != endZoom || startZoomFP != 0)) {
|
||||
animatingZoomInThread(moveZoom, startZoomFP, endZoom, 0, ZOOM_MOVE_ANIMATION_TIME, notifyListener);
|
||||
animatingZoomInThread(moveZoom, startZoomFP, endZoom, 0, doNotUseAnimations ? 0 : ZOOM_MOVE_ANIMATION_TIME, notifyListener);
|
||||
}
|
||||
tileView.setFractionalZoom(endZoom, 0, notifyListener);
|
||||
|
||||
|
|
Loading…
Reference in a new issue