Skip to content

Commit

Permalink
feat: Canvas layer should use a pointer cursor when hovering a clicka…
Browse files Browse the repository at this point in the history
…ble feature (closes #898)
  • Loading branch information
claustres committed Jul 9, 2024
1 parent 96125cc commit 5c6b424
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions map/client/mixins/map/mixin.canvas-layers.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,13 @@ L.KanvasLayer = (L.Layer ? L.Layer : L.Class).extend({
}

// Skip redraw when no feature hovered and we're not highlighting
if (!hoveringFeatures && !this.highlighting) return
this.needRedraw()
if (!hoveringFeatures && !this.highlighting) {
this._canvas.style.cursor = ''
return
} else {
this._canvas.style.cursor = 'pointer'
this.needRedraw()
}
},
// -------------------------------------------------------------
getEvents: function () {
Expand Down

0 comments on commit 5c6b424

Please sign in to comment.