Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ebdfdad

Browse files
committed
skip over hover when inverting mouse position leads to null
- this can happen when the cursor on the bg rect but off the map (on curly projection types).
1 parent c227d15 commit ebdfdad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plots/geo/geo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ proto.plot = function(geoCalcData, fullLayout, promises) {
8989
var mouse = d3.mouse(this),
9090
lonlat = _this.projection.invert(mouse);
9191

92-
if(isNaN(lonlat[0]) || isNaN(lonlat[1])) return;
92+
if(!lonlat || isNaN(lonlat[0]) || isNaN(lonlat[1])) return;
9393

9494
var evt = {
9595
target: true,

0 commit comments

Comments
 (0)