Deck.gl: diference in delay between onClick and onHover

Created on 14 Oct 2019  路  6Comments  路  Source: visgl/deck.gl

I see that the onClick event has a delay, and onHover event is much faster.
i see th same issues #2683 .. but people ask to show the code, when the problem is visible on the site in exames https://deck.gl/#/examples/core-layers/icon-layer

handle onHover and onClick have the same atributes, but onClick has delay ~200ms

maybe someone faced this problem ?
I know the way to use onHover to manage variable to state and set onClick on the map ... but

FAQ question

All 6 comments

All events are processed through EventManager from mjolnir.js module.

How is ~200ms measured?

Also it is possible that a mouse click event detection takes longer when compared to moues move ??

onClick has a small delay so that the event doesn't fire when double clicking. What is your use case?

onClick has a small delay so that the event doesn't fire when double clicking. What is your use case?

Thanks for the answer, for instance I want to show popup or create pin ... doesn't matter, is there a way to get rid of this delay ?

I'm also looking for a way to override the double-click delay for a faster response more akin to the mouse move event. Is it possible to change the wait time?

You can disable double click by setting controller: {doubleClickZoom: false}

Thanks @Pessimistress, that took care of it for me

Was this page helpful?
0 / 5 - 0 ratings