[android] - reverse order of prioritising shape vs marker click handling

This commit is contained in:
Tobrun
2018-10-09 13:05:23 +02:00
committed by Tobrun
parent 7bf29bbf5a
commit 1e71075b3f

View File

@@ -379,17 +379,17 @@ class AnnotationManager {
//
boolean onTap(PointF tapPoint) {
ShapeAnnotationHit shapeAnnotationHit = getShapeAnnotationHitFromTap(tapPoint);
Annotation annotation = new ShapeAnnotationHitResolver(shapeAnnotations).execute(shapeAnnotationHit);
if (annotation != null) {
if (handleClickForShapeAnnotation(annotation)) {
MarkerHit markerHit = getMarkerHitFromTouchArea(tapPoint);
long markerId = new MarkerHitResolver(mapboxMap).execute(markerHit);
if (markerId != NO_ANNOTATION_ID) {
if (isClickHandledForMarker(markerId)) {
return true;
}
}
MarkerHit markerHit = getMarkerHitFromTouchArea(tapPoint);
long markerId = new MarkerHitResolver(mapboxMap).execute(markerHit);
return markerId != NO_ANNOTATION_ID && isClickHandledForMarker(markerId);
ShapeAnnotationHit shapeAnnotationHit = getShapeAnnotationHitFromTap(tapPoint);
Annotation annotation = new ShapeAnnotationHitResolver(shapeAnnotations).execute(shapeAnnotationHit);
return annotation != null && handleClickForShapeAnnotation(annotation);
}
private ShapeAnnotationHit getShapeAnnotationHitFromTap(PointF tapPoint) {