Cesium's touch events

Hey ,
I am building an app using cesium that need to support both touch screen and keyboard.
I am using Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK event in my app
to do some actions and I have noticed that it is not working when using touch screen(I was expecting double tap).

https://cesium.com/learn/cesiumjs/ref-doc/ScreenSpaceEventType.html

Is there any alternative I am missing ?

Hi @Itay_ba,

I took some time to read through our documentation for ScreenSpaceEventType. I would expect that the Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK event would be triggered by a double-tap.

Are you able to test to see which events are triggered by a double tap?

I do not have a lot of experience developing touch screen CesiumJS applications but I am looking forward to learning more. As always, community input is welcome!

-Sam

Hey Sam,
I have tested it .
If you go to:

https://github.com/CesiumGS/cesium/blob/main/Source/Core/ScreenSpaceEventHandler.js

and look for registerListener function you will notice that the handler would
trigger when double clicking with the mouse , but wont trigger on double tap.

Hi @Itay_ba,

Thanks for sharing this. I recommend that you turn these findings into a GitHub issue for the rest of the CesiumJS squad to review.

Wondering if there is a native JavaScript/HTML solution to this question - what are your thoughts on this?

Another workaround would be to time the frequency of the clicks and manually trigger the “double-click” event.

-Sam