Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2016-12-29 12:24:20 +01:00
commit 870ef13325
2 changed files with 32 additions and 39 deletions

View file

@ -88,10 +88,10 @@ public class MultiTouchSupport {
if(inZoomMode){ if(inZoomMode){
listener.onZoomOrRotationEnded(zoomRelative, angleRelative); listener.onZoomOrRotationEnded(zoomRelative, angleRelative);
inZoomMode = false; inZoomMode = false;
return true; //return true;
} }
return false; return false;
} else if (pointCount == 2) { }
Float x1 = (Float) getX.invoke(event, 0); Float x1 = (Float) getX.invoke(event, 0);
Float x2 = (Float) getX.invoke(event, 1); Float x2 = (Float) getX.invoke(event, 1);
Float y1 = (Float) getY.invoke(event, 0); Float y1 = (Float) getY.invoke(event, 0);
@ -111,12 +111,12 @@ public class MultiTouchSupport {
angleStarted = angle; angleStarted = angle;
inZoomMode = true; inZoomMode = true;
return true; return true;
//} else if(actionCode == ACTION_POINTER_UP){ } else if(actionCode == ACTION_POINTER_UP){
// if(inZoomMode){ if(inZoomMode){
// listener.onZoomOrRotationEnded(zoomRelative, angleRelative); listener.onZoomOrRotationEnded(zoomRelative, angleRelative);
// inZoomMode = false; inZoomMode = false;
// } }
// return true; return true;
} else if(inZoomMode && actionCode == MotionEvent.ACTION_MOVE){ } else if(inZoomMode && actionCode == MotionEvent.ACTION_MOVE){
if(angleDefined) { if(angleDefined) {
angleRelative = MapUtils.unifyRotationTo360(angle - angleStarted); angleRelative = MapUtils.unifyRotationTo360(angle - angleStarted);
@ -125,7 +125,6 @@ public class MultiTouchSupport {
listener.onZoomingOrRotating(zoomRelative, angleRelative); listener.onZoomingOrRotating(zoomRelative, angleRelative);
return false; return false;
} }
}
} catch (Exception e) { } catch (Exception e) {
log.debug("Multi touch exception" , e); //$NON-NLS-1$ log.debug("Multi touch exception" , e); //$NON-NLS-1$
} }

View file

@ -862,12 +862,6 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
layers.get(i).onTouchEvent(event, getCurrentRotatedTileBox()); layers.get(i).onTouchEvent(event, getCurrentRotatedTileBox());
} }
gestureDetector.onTouchEvent(event); gestureDetector.onTouchEvent(event);
} else {
MotionEvent cancelEvent = MotionEvent.obtain(SystemClock.uptimeMillis(), SystemClock.uptimeMillis() + 100, MotionEvent.ACTION_CANCEL, 0.0f, 0.0f, 0);
for (int i = layers.size() - 1; i >= 0; i--) {
layers.get(i).onTouchEvent(cancelEvent, getCurrentRotatedTileBox());
}
gestureDetector.onTouchEvent(cancelEvent);
} }
return true; return true;
} }