-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Add support for touch and hold gesture #7286
Conversation
Thank you so much for the pull request @adridavid! I noticed this is your first pull request and I wanted to say welcome to the Cesium community! The Pull Request Guidelines is a handy reference for making sure your PR gets accepted quickly, so make sure to skim that.
Reviewers, don't forget to make sure that:
I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome. 🌍 🌎 🌏 |
Thanks for the pull requests @adridavid! Please send us a CLA so we can review this and #7285 We should be able to review this after the release next week |
Thanks again @adridavid, we received your CLA. |
@adridavid please merge in master when you have a chance. Thanks! |
Thanks again for your contribution @adridavid! No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy? I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with |
Thanks @adridavid. Can you merge in master again and move your CHANGES.md change under the 1.55 section? @emackey can you review this? |
I just merged in master and updated CHANGES.md @hpinkos . |
Overall this seems great, and I love that it's wired into the One wrinkle I had while testing this is it was very tricky for me to hold my finger steady enough (on a Surface Pro 4 with a fairly large screen) such that I triggered the event rather than just panning the globe. Is there a way to increase the robustness of that? (Obviously without making the pan wait for it, but maybe by allowing the pan to travel some larger number of pixels without voiding it). Just a suggestion. Here's a Sandcastle I was using for testing. It's the picking demo, modded to use right-clicking, which on this branch can be done with an actual mouse or by touch-hold.
|
Thank you @emackey ! Concerning the number of pixels without voiding the event, I wanted it to be consistent with the simple click and I used the same behavior as for left click in touch mode : The pixel tolerance was previously set to 5, but there is a comment that suggests it should be revisited : Maybe we could use a second value which would be greater for the touch and hold event. However, I don't know which tolerance would be a good choice to handle correctly all screen sizes. |
@adridavid Do you think it's worth adding a |
@emackey I did the change. |
Thanks again for your contribution @adridavid! No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy? I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with |
@emackey what's the status of this? |
Sorry, lost track of this, I have to test it at home because I don't have a touch screen at work. I was pretty close to merging it before, so I think it's probably ready now, just want to test it on a touch screen once more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @adridavid!
Currently, the only available event types in touch mode are LEFT_DOWN/LEFT_UP/LEFT_CLICK and LEFT_DOUBLE_CLICK. Since the touch and hold gesture is widely used on mobile devices, this is a pull request to add support for this event type.
Generally the touch and hold gesture is associated with the right click. For this reason, I linked it with the RIGHT_CLICK event type. But we may also think it as a new event type (for instance TOUCH_HOLD).
The amount of time before a touch becomes a touch and hold can be customized. It is set by default to 1,5 seconds.