-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Panning in mobile devices #2296
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
Conversation
Also two questions:
|
@alexcjohnson that might be difficult to test if CI window gets scroll changed while panning 3d/2d plots. Is that sort of test we ideally want? |
@alexcjohnson I don't see any difficulty in |
Right, it's a little difficult, but if we're fixing a bug we really should try to find a way to test it. Two ideas come to mind:
Thanks for looking into |
I've noticed on python module that when fixedrange is true for x and y it doesn't reset the behavior of touchmove (or touchstart?), i.e., the page won't scroll when touchmove on the graph. Is it on purpose? |
Unfortunately yes. All non- |
@etpinard gl2d events fixed with fa1db3b. Waiting for @mikolalysenko to approve PRs. |
@alexcjohnson seems that browsers do not allow to trigger default action by emulated events, like scrolling container/document by emulating Not sure if we should stop propagation, but testing prevented default is a good thought. |
@alexcjohnson should be fixed, it remains merging mouse-wheel PR, although it should not affect this PR. |
We should wait for new |
@etpinard I merged and published |
Cool. Let's wait a few days. If we don't get any news from Mikola, we'll merge this thing before the next minor |
@dfcreative Any news from Mikola? If not, would you mind fixing the merge conflicts and merge this in to include this in |
Oh wait. This PR was opened before the new npm5 package-lock file was added. Can you regenerate the package-lock with the new deps? |
package.json
Outdated
@@ -55,7 +55,6 @@ | |||
}, | |||
"dependencies": { | |||
"3d-view": "^2.0.0", | |||
"3d-view-controls": "^2.2.2", |
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.
good catch here. Thanks!
Well done @dfcreative 💃 |
This prevents page scroll while panning 3d plots in mobile devices, related to #1411 (comment).
Also this disables event logging for 3d plots, akin to #2251.
passive: false
Prevent page scrolling mikolalysenko/3d-view-controls#6passive: false
Mute event logging mikolalysenko/mouse-wheel#7Lib.eventListenerOptionsSupported
withhas-passive
@alexcjohnson please review.