Skip to content

Commit

Permalink
replace d3.mouse in geo hover to work around firefox bug (plotly#5525)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaVazz committed Apr 22, 2021
1 parent cc1c2b0 commit 341963e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/plots/geo/geo.js
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,11 @@ proto.updateFx = function(fullLayout, geoLayout) {
}

bgRect.on('mousemove', function() {
var lonlat = _this.projection.invert(d3.mouse(this));
var d3EventPosition = [
d3.event.offsetX,
d3.event.offsetY,
];
var lonlat = _this.projection.invert(d3EventPosition);

if(!lonlat || isNaN(lonlat[0]) || isNaN(lonlat[1])) {
return dragElement.unhover(gd, d3.event);
Expand Down

0 comments on commit 341963e

Please sign in to comment.