Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Reverse order of prioritising shape vs marker click handling #13059

Merged
merged 1 commit into from
Oct 9, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -379,17 +379,17 @@ private void logNonAdded(Annotation annotation) {
//

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) {
Expand Down