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