Skip to content

Commit 1296f8f

Browse files
committed
Work around for pointermove event on hidden map (#1450)
1 parent fc0a9fd commit 1296f8f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/components/interactive-map.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ function normalizeEvent(event) {
134134
if (event.lngLat || !event.offsetCenter) {
135135
return event;
136136
}
137+
// https://github.com/visgl/react-map-gl/issues/1449
138+
if (!this.width || !this.height) {
139+
return event;
140+
}
137141

138142
const {
139143
offsetCenter: {x, y}

0 commit comments

Comments
 (0)