Skip to content

Commit

Permalink
Drop isAngleOverThreshold
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-osm committed Sep 2, 2024
1 parent f40f660 commit f8798f3
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java
Original file line number Diff line number Diff line change
Expand Up @@ -2161,7 +2161,7 @@ public void onZoomingOrRotating(double relativeToStart, float relAngle) {
} else {
startZooming = true;
}
if (mapGestureAllowed(MapGestureType.TWO_POINTERS_ROTATION) && isAngleOverThreshold(Math.abs(relAngle), Math.abs(deltaZoom))) {
if (mapGestureAllowed(MapGestureType.TWO_POINTERS_ROTATION)) {
startRotating = true;
} else {
relAngle = 0;
Expand All @@ -2172,16 +2172,6 @@ public void onZoomingOrRotating(double relativeToStart, float relAngle) {
}
}

private boolean isAngleOverThreshold(float angle, double deltaZoom) {
if (startRotating) {
return true;
} else if (!startZooming) {
return Math.abs(angle) >= ZONE_0_ANGLE_THRESHOLD;
} else {
return false;
}
}

@Override
public void onZooming(double relativeToStart) {
double dz = (relativeToStart - 1) * DoubleTapScaleDetector.SCALE_PER_SCREEN;
Expand Down

0 comments on commit f8798f3

Please sign in to comment.