Skip to content
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

Camera moves after releasing #6478

Open
puckey opened this issue Apr 21, 2018 · 4 comments
Open

Camera moves after releasing #6478

puckey opened this issue Apr 21, 2018 · 4 comments

Comments

@puckey
Copy link
Contributor

puckey commented Apr 21, 2018

On mobile, when you pinch to zoom into the globe, it often moves after you release the pinch.

In this screen recording I am pinching to zoom in multiple times. As you can see the globe moves every time I release the pinch:

https://www.dropbox.com/s/y4zqsrqb1c4rhkq/ScreenRecording_04-21-2018%2014-37-15.MP4?dl=0

@emackey
Copy link
Contributor

emackey commented Apr 21, 2018

What you're seeing is camera inertia. You can "fling" the globe with one finger ("pan"), and if you let go of it while still moving fast, it will slow down gradually rather than abruptly stop.

In this video, it looks like one finger of the pinch-zoom is letting go just prior to the other. When one finger lets go, the other re-enters pan mode. That second finger then lets go while moving fast, and you get inertia off the pan rather than inertia off the pinch.

One thing we might want to consider: If a pinch is in progress, and one finger lets go, we could just end the whole gesture, rather than re-entering pan mode. This would prevent any pan inertia from showing up on the end of a pinch, but would mean you need to let go both fingers of pinch before starting a new pan.

@puckey
Copy link
Contributor Author

puckey commented Apr 21, 2018

I just put up a pr where a pinch only ends when both fingers have released and a TOUCH_DOWN will only be triggered when not pinching: #6479

I will try to write a test for this behaviour next week.

@puckey
Copy link
Contributor Author

puckey commented Apr 23, 2018

I added pinch release tests: 293aeeb

@puckey
Copy link
Contributor Author

puckey commented Apr 23, 2018

My new code was causing PINCH_START to be called too often. Tests and fix here: edc8294

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants