Skip to content

Allowing two-finger pitch with cooperative gestures in fullscreen #12165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 16, 2022

Conversation

SnailBones
Copy link
Contributor

@SnailBones SnailBones commented Aug 12, 2022

Follow up to #12058, which fixed cooperative gestures dragging behavior and warning message incorrectly appearing in fullscreen on mobile (#11635). A small oversight was that the cooperative gestures still applied to touch pitch, making them require 3 instead of 2 fingers, which causes two finger interactions to instead pan the map. This PR makes fullscreen behavior consistent with maps without cooperative gestures.

Also adds previously missing tests for touch pitch.

Here I test a two-finger drag on Android:

Before fix:

pitch-broken.webm

After fix:

pitch-fixed.webm

Launch Checklist

  • briefly describe the changes in this PR
  • include before/after visuals or gifs if this PR includes visual changes
  • write tests for all new functionality
  • manually test the debug page
  • apply changelog label ('bug', 'feature', 'docs', etc) or use the label 'skip changelog'
  • add an entry inside this element for inclusion in the mapbox-gl-js changelog: <changelog>Fix incorrectly requiring three finger drags to change pitch with cooperative gestures while in fullscreen.</changelog>

Sorry, something went wrong.

@avpeery
Copy link
Contributor

avpeery commented Aug 16, 2022

@SnailBones Unfortunately, the fullscreen api isn't supported on iPhones. I'll reach out to the team to see if anyone has an iPad to test iOS support. (see MDN). The solution makes sense though and tests look good!

Copy link
Contributor

@avpeery avpeery left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for testing on another touch screen @SnailBones

@SnailBones SnailBones merged commit 5406af6 into main Aug 16, 2022
@SnailBones SnailBones deleted the aidan/cooperative-touch-pitch branch August 16, 2022 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants