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

[android] fixed horizontal panning going the opposite direction - #7105

Merged
frederoni merged 1 commit into
masterfrom
fred-horizontal-panning-fix
Nov 18, 2016
Merged

frederoni merged 1 commit into
masterfrom
fred-horizontal-panning-fix

Conversation

@frederoni

Copy link
Copy Markdown
Contributor

Fixes #7104

The root cause was that the nativeMapView's gestureInProgress was false during the fling.
This resulted in mbgl map unwrapping the longitude to find the shortest path > https://github.com/mapbox/mapbox-gl-native/blob/master/src/mbgl/map/transform.cpp#L111

Without the unwrapping, the deceleration rate was way too slow as well as the duration causing a simple fling to go around the world 50 times before stopping. The new deceleration rate mimics a scrollView with fast scrolling disabled.

horizontal_fix

@tobrun 👀

@frederoni frederoni added Android Mapbox Maps SDK for Android bug labels Nov 17, 2016
@frederoni frederoni self-assigned this Nov 17, 2016
@mention-bot

Copy link
Copy Markdown

@frederoni, thanks for your PR! By analyzing the history of the files in this pull request, we identified @hollinger, @brunoabinader and @ljbade to be potential reviewers.

@tobrun

tobrun commented Nov 18, 2016

Copy link
Copy Markdown
Member

Work great @frederoni, thank you for looking into this!

@tobrun tobrun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Android Mapbox Maps SDK for Android bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Swiping horizontally causes the map to go the opposite direction

4 participants