Deck.gl: Can I change Cursor on hover of point?

Created on 29 Apr 2020  路  2Comments  路  Source: visgl/deck.gl

In Scatterplot layer, can I change cursor to pointer on hover of plotted points?
ex. https://news.google.com/covid19/map

question

Most helpful comment

let isHovering = false;

Deck({
  ...
  onHover: ({object}) => (isHovering = Boolean(object)),
  getCursor: ({isDragging}) => (isDragging ? 'grabbing' : (isHovering ? 'pointer' : 'grab'))
})

All 2 comments

let isHovering = false;

Deck({
  ...
  onHover: ({object}) => (isHovering = Boolean(object)),
  getCursor: ({isDragging}) => (isDragging ? 'grabbing' : (isHovering ? 'pointer' : 'grab'))
})

Thanks @Pessimistress .

Was this page helpful?
0 / 5 - 0 ratings