webglearth / webglearth2

[UNMAINTAINED] WebGL Earth 2 - the source code of the project
Apache License 2.0
888 stars 212 forks source link

long touch on touch screen #133

Closed eprtha closed 2 months ago

eprtha commented 2 months ago

Initially, the map works well on a touchscreen—touch, drag, zoom in/out, etc. However, after a long touch, the map no longer moves; instead, it only rotates or zooms in/out when dragging. How to prevent or how to escape from that situation back to normal dragging operation?

sebastian-marinescu commented 2 months ago

Hi @eprtha, have you tried this?

eprtha commented 2 months ago

Hi @sebastian-marinescu I already use that solution for touch operation. Thanks a lot. That was also a big help. This symptom is different one. Please try long touch on the globe of https://www.webglearth.com/. You will see what I meant. Initially, dragging moves the globe, as expected. But after long touch, the globe position is fixed at the point of long touch and dragging rotates, tilts and zooms the globe.

sebastian-marinescu commented 2 months ago

Hmmm, I see... It seems that the "text-selection" from the browser is triggered, and then everything is weird.

@eprtha Can you please try adding user-select: none; to your CSS for the wrapper (and maybe also on body/html)?

eprtha commented 2 months ago

Hmmm, I see... It seems that the "text-selection" from the browser is triggered, and then everything is weird.

@eprtha Can you please try adding user-select: none; to your CSS for the wrapper (and maybe also on body/html)?

Hi @sebastian-marinescu It worked! I tested it using my notebook with touch screen. Additional test will be done with smartphone soon. I'll let you know the result as well. I appreciate your support :-)

sebastian-marinescu commented 2 months ago

Nice, happy to read this :) I'm also curious to know if that fixes it on smartphones 👍

eprtha commented 2 months ago

@sebastian-marinescu It works smoothly even on smartphone(Android) 👍 Why don't you take over this project ? :-) WebGL Earth is too nice to be abandoned...