Skip to content

Commit

Permalink
Work around for pointermove event on hidden map (#1450)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pessimistress committed May 3, 2021
1 parent fc0a9fd commit 1296f8f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/interactive-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ function normalizeEvent(event) {
if (event.lngLat || !event.offsetCenter) {
return event;
}
// https://github.com/visgl/react-map-gl/issues/1449
if (!this.width || !this.height) {
return event;
}

const {
offsetCenter: {x, y}
Expand Down

0 comments on commit 1296f8f

Please sign in to comment.