Skip to content

Commit 0e8d53e

Browse files
committed
lint: rename ax -> axKey
... to not confuse 'xa' & 'ya' with ax objects
1 parent 0690162 commit 0e8d53e

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/components/fx/hover.js

+8-6
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,6 @@ function createHoverText(hoverData, opts, gd) {
839839

840840
// show all the individual labels
841841

842-
843842
// first create the objects
844843
var hoverLabels = container.selectAll('g.hovertext')
845844
.data(hoverData, function(d) {
@@ -1055,7 +1054,7 @@ function createHoverText(hoverData, opts, gd) {
10551054
// know what happens if the group spans all the way from one edge to
10561055
// the other, though it hardly matters - there's just too much
10571056
// information then.
1058-
function hoverAvoidOverlaps(hoverLabels, ax, fullLayout) {
1057+
function hoverAvoidOverlaps(hoverLabels, axKey, fullLayout) {
10591058
var nummoves = 0;
10601059
var axSign = 1;
10611060
var nLabels = hoverLabels.size();
@@ -1064,10 +1063,13 @@ function hoverAvoidOverlaps(hoverLabels, ax, fullLayout) {
10641063
var pointgroups = new Array(nLabels);
10651064

10661065
hoverLabels.each(function(d, i) {
1067-
var axis = d[ax];
1068-
var axIsX = axis._id.charAt(0) === 'x';
1069-
var rng = axis.range;
1070-
if(!i && rng && ((rng[0] > rng[1]) !== axIsX)) axSign = -1;
1066+
var ax = d[axKey];
1067+
var axIsX = ax._id.charAt(0) === 'x';
1068+
var rng = ax.range;
1069+
1070+
if(!i && rng && ((rng[0] > rng[1]) !== axIsX)) {
1071+
axSign = -1;
1072+
}
10711073
pointgroups[i] = [{
10721074
datum: d,
10731075
i: i,

0 commit comments

Comments
 (0)