vasturiano / globe.gl

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

onCustomLayerClick doesn't work on some mobile devices #70

Open franciscosierra1915 opened 3 years ago

franciscosierra1915 commented 3 years ago

Describe the bug

onCustomLayerClick doesn't work on some mobile devices. You have to tap very lightly/delicately to get the touch event to work.

Expected behavior

On devices like iPad Pro, Surface, iPhone 11, etc, onCustomLayerClick works completely fine.

onCustomLayerClick doesn't work on these devices:

Additional context Is there any other way to access the object on touch devices? Something like onCustomLayerTouch? Or someway to access the object manually to implement custom touch events? I'm thinking of something like world.scene().children.find(obj3d => obj3d.type === "globeObj.__globeObjType");

vasturiano commented 3 years ago

@franciscosierra1915 perhaps this is related to the type of object that you've used in customThreeObject. Do you have a repro example on codepen or so that we can check?