vasturiano / globe.gl

UI component for Globe Data Visualization using ThreeJS/WebGL
https://vasturiano.github.io/globe.gl/example/world-population/
MIT License
2.03k stars 301 forks source link

Mobile version scroll vs rotate gestures #58

Closed dlauc closed 3 years ago

dlauc commented 3 years ago

Thank you for the great component. My issue is that when the globe is in the middle of a mobile page, it clashes with the webpage scroll (the globe rotate and it is hard or impossible to scroll down the page). I know this is not a specific problem but it would be great if there is a workaround for the recognition of different gestures (scroll vs rotate).

vasturiano commented 3 years ago

@dlauc thanks for reaching out.

You can access the Orbit controls configuration via myGlobe.controls(). From there you can setup what's more suitable for your app, for example by disabling the rotation (myGlobe.controls().enableRotate = false) when the page is scrolling.

dlauc commented 3 years ago

thanks