Merged
Conversation
I found that most (of not all) Cesium sandcastles (online examples) have this CSS rule to block touch action, it fixes all issues I experienced with panning while on a mobile device! I also de-activated the location popup (right-click) on mobile, as it wasn't very consistent how to trigger a right click with a touch screen.
8b1bf0a to
324c11f
Compare
Contributor
|
A quick test showed that the location popup on 3d on mobile is still available on long press and a bit buggy. Otherwise the navigation in 3d on mobile seems to work quite well, well done. I'll do the review tomorrow morning. |
ltshb
reviewed
Nov 23, 2023
Contributor
ltshb
left a comment
There was a problem hiding this comment.
The code looks good thanks. The 3d in mobile is definitively much better.
However le location popup in 3d has still some issues:
- sometimes it disappear on touch stop
- sometimes it also select the whole map
In the PR comment you added a notice that the location popup is disabled in 3d mobile, it is not but it might be the solution, or at least for the moment ?
Comment on lines
+540
to
+545
| if (event.touches.length === 1) { | ||
| this.contextMenuTimeoutId = setTimeout(() => { | ||
| const touch = event.touches[0] | ||
| this.onContextMenu(touch) | ||
| }, 500) | ||
| } |
Contributor
There was a problem hiding this comment.
Here it would be good to use a constant LONG_PRESS_TIMEOUT = 500
ltshb
approved these changes
Nov 23, 2023
Contributor
ltshb
left a comment
There was a problem hiding this comment.
As discussed in daily, all good for now
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I found that most (of not all) Cesium sandcastles (online examples) have this CSS rule to block touch action, it fixes all issues I experienced with panning while on a mobile device!
I also de-activated the location popup (right-click) on mobile, as it wasn't very consistent how to trigger a right click with a touch screen.
Test link