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

Validate if gestures should execute #9173

Merged
merged 1 commit into from
Jun 2, 2017
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 @@ -383,6 +383,14 @@ public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float ve
// Called for drags
@Override
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
if (!trackingSettings.isScrollGestureCurrentlyEnabled()) {
return false;
}

if (dragStarted) {
return false;
}

if (!scrollInProgress) {
scrollInProgress = true;

Expand All @@ -393,13 +401,6 @@ public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float d
getLocationFromGesture(e1.getX(), e1.getY()),
MapboxEvent.GESTURE_PAN_START, transform));
}
if (!trackingSettings.isScrollGestureCurrentlyEnabled()) {
return false;
}

if (dragStarted) {
return false;
}

// reset tracking if needed
trackingSettings.resetTrackingModesIfRequired(true, false, false);
Expand Down