Deck.gl: How can I know map is dragging?

Created on 26 Oct 2017  路  4Comments  路  Source: visgl/deck.gl

Most helpful comment

@kershnerd
Yeah. MapGL component has getCursor props, you can pass a function and get cursor event.
For example:

<MapGL
  getCursor={(cursor) => {
    console.log(cursor.isDragging)
  }}
>
</MapGL>

All 4 comments

Did you figure this out? I am trying to figure out that same thing...

@kershnerd
Yeah. MapGL component has getCursor props, you can pass a function and get cursor event.
For example:

<MapGL
  getCursor={(cursor) => {
    console.log(cursor.isDragging)
  }}
>
</MapGL>

@jacklam718 Any chance you know how to tell when a zoom ended? The cursor.isDragging is working well for panning and rotation, but it isn't set for when I am doing a pinch zoom.

@kershnerd I'm not sure, you can try to workaround with onViewportChange

Was this page helpful?
0 / 5 - 0 ratings