Add small fixes
This commit is contained in:
parent
b7c3eca4a7
commit
798f7abedd
2 changed files with 5 additions and 9 deletions
|
@ -334,10 +334,6 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
|
|||
return wasZoomInMultiTouch;
|
||||
}
|
||||
|
||||
public void setWasZoomInMultiTouch(boolean wasZoomInMultiTouch) {
|
||||
this.wasZoomInMultiTouch = wasZoomInMultiTouch;
|
||||
}
|
||||
|
||||
public boolean mapGestureAllowed(OsmandMapLayer.MapGestureType type) {
|
||||
for (OsmandMapLayer layer : layers) {
|
||||
if (!layer.isMapGestureAllowed(type)) {
|
||||
|
@ -1128,6 +1124,9 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
|
|||
float calcRotate = calc.getRotate() + angle;
|
||||
calc.setRotate(calcRotate);
|
||||
calc.setZoomAndAnimation(initialViewport.getZoom(), dz, initialViewport.getZoomFloatPart());
|
||||
if (multiTouch) {
|
||||
wasZoomInMultiTouch = true;
|
||||
}
|
||||
|
||||
final QuadPoint cp = initialViewport.getCenterPixelPoint();
|
||||
// Keep zoom center fixed or flexible
|
||||
|
|
|
@ -153,14 +153,11 @@ public class RulerControlLayer extends OsmandMapLayer {
|
|||
|
||||
if (view.isMultiTouch()) {
|
||||
showDistBetweenFingerAndLocation = false;
|
||||
if (view.isZooming()) {
|
||||
view.setWasZoomInMultiTouch(true);
|
||||
}
|
||||
} else if (cacheMultiTouchEndTime != view.getMultiTouchEndTime()) {
|
||||
cacheMultiTouchEndTime = view.getMultiTouchEndTime();
|
||||
refreshMapDelayed();
|
||||
}
|
||||
showTwoFingersDistance = !view.isWasZoomInMultiTouch() && !view.isZooming() &&
|
||||
showTwoFingersDistance = !view.isWasZoomInMultiTouch() && !tb.isZoomAnimated() &&
|
||||
(view.isMultiTouch() || System.currentTimeMillis() - cacheMultiTouchEndTime < DELAY);
|
||||
|
||||
Location currentLoc = app.getLocationProvider().getLastKnownLocation();
|
||||
|
@ -307,7 +304,7 @@ public class RulerControlLayer extends OsmandMapLayer {
|
|||
|
||||
private void drawCircle(Canvas canvas, RotatedTileBox tb, int circleNumber, QuadPoint center,
|
||||
RenderingLineAttributes attrs) {
|
||||
if (!mapActivity.getMapView().isZooming()) {
|
||||
if (!tb.isZoomAnimated()) {
|
||||
Rect bounds = new Rect();
|
||||
String text = cacheDistances.get(circleNumber - 1);
|
||||
attrs.paint2.getTextBounds(text, 0, text.length(), bounds);
|
||||
|
|
Loading…
Reference in a new issue