Skip to content

Commit

Permalink
adapt to review comments (plotly#5525)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaVazz committed May 26, 2021
1 parent 7b5c166 commit 344fb91
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1280,17 +1280,16 @@ lib.bigFont = function(size) {
return Math.round(1.2 * size);
};

var firefoxVersion = lib.getFirefoxVersion();
// see https://bugzilla.mozilla.org/show_bug.cgi?id=1684973
var isProblematicFirefox = firefoxVersion !== null && firefoxVersion < 86;

/**
* Return the mouse position from the last event registered by D3.
* @returns An array with two numbers, representing the x and y coordinates of the mouse pointer
* at the event relative to the targeted node.
*/
lib.getPositionFromD3Event = function() {
var firefoxVersion = lib.getFirefoxVersion();

// see https://bugzilla.mozilla.org/show_bug.cgi?id=1684973
var isProblematicFirefox = firefoxVersion && firefoxVersion < 86;

if(isProblematicFirefox) {
// layerX and layerY are non-standard, so we only fallback to them when we have to:
return [
Expand Down

0 comments on commit 344fb91

Please sign in to comment.