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

Clicking point on Mobile Devices doesn't have any effect. #10

Closed Asuddle closed 4 years ago

Asuddle commented 4 years ago

I am using points on globe gl. On clicking the point a card is shown .It works fine on the browser and I get my desired thing. But When I switch to mobile devices it doesn't seem to work. It doesn;t call hover or click function . I have used android as well as Ios devices to check this and it is the same . When I tried to test it on the PC browser. It work fine on different screen of mozilla firefox but it doesn't work on the google chrome small screen .I have also enabled the webgl extension on chrome and it's still the same .I also tried to test the example given in library and the behavior was same Please tell me about what can be done regarding this issue?

ttK5050 commented 4 years ago

Yes, I did notice this as well. I'm not by any means an expert in this, but some cursory research indicates that "Touch Events" and "Mouse Events" are distinct in ThreeJS.

As most applications must be "mobile-friendly" these days, it would be really helpful if this (already very helpful) component could grow to include touch events - or perhaps instead expose more of the underlying framework's controls.

vasturiano commented 4 years ago

@Asuddle @ttK5050 I finally got around to adding support for touch events in the object interactions. This is now available in v2.11.1. Please try it and let me know if it works for you. 👍

ttK5050 commented 4 years ago

Thanks very much, @vasturiano for the prompt turnaround! I'll have a go at it today! Appreciate all your work!

ahmedkhalidbutt commented 4 years ago

@vasturiano any expected documentation update regarding this fix implementation?

ahmedkhalidbutt commented 4 years ago

@vasturiano I have explored the recent versions you have uploaded and checked for a possible implementation for the mobile devices support. Can you update the documentation or examples regarding this? Some explanation would be appreciated.

vasturiano commented 4 years ago

@AhmadButt00 there are no new methods in the api, so not much to update. The only change is that the on*Click events now work with all pointer devices, including touch screens.

ahmedkhalidbutt commented 4 years ago

@vasturiano I have tried the new version but there is still a lack of support for mobile devices and as far as onClick event is concerned they still do not work with the touch screen. Can you have a look again if the right files were committed or any missing change that you implemented regarding mobile devices support?

vasturiano commented 4 years ago

@AhmadButt00 would you mind putting a simple example on https://codepen.io that works with mouse interactions but not touch interactions. This would make it easier to debug the case further.

ahmedkhalidbutt commented 4 years ago

@vasturiano There was a dependency management issue. I have verified it and its working as expected, thank you for putting in effort into this issue.