Skip to content

Commit 344fb91

Browse files
committed
adapt to review comments (#5525)
1 parent 7b5c166 commit 344fb91

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/lib/index.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -1280,17 +1280,16 @@ lib.bigFont = function(size) {
12801280
return Math.round(1.2 * size);
12811281
};
12821282

1283+
var firefoxVersion = lib.getFirefoxVersion();
1284+
// see https://bugzilla.mozilla.org/show_bug.cgi?id=1684973
1285+
var isProblematicFirefox = firefoxVersion !== null && firefoxVersion < 86;
1286+
12831287
/**
12841288
* Return the mouse position from the last event registered by D3.
12851289
* @returns An array with two numbers, representing the x and y coordinates of the mouse pointer
12861290
* at the event relative to the targeted node.
12871291
*/
12881292
lib.getPositionFromD3Event = function() {
1289-
var firefoxVersion = lib.getFirefoxVersion();
1290-
1291-
// see https://bugzilla.mozilla.org/show_bug.cgi?id=1684973
1292-
var isProblematicFirefox = firefoxVersion && firefoxVersion < 86;
1293-
12941293
if(isProblematicFirefox) {
12951294
// layerX and layerY are non-standard, so we only fallback to them when we have to:
12961295
return [

0 commit comments

Comments
 (0)