Skip to content

Commit dfa918f

Browse files
committed
pass hoverlayer to trace module hoverPoints
- in preparation for violin 'kde' hover handling
1 parent 6ffc379 commit dfa918f

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

src/components/fx/hover.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ function _hover(gd, evt, subplot, noHoverEvent) {
381381

382382
// Now find the points.
383383
if(trace._module && trace._module.hoverPoints) {
384-
var newPoints = trace._module.hoverPoints(pointData, xval, yval, mode);
384+
var newPoints = trace._module.hoverPoints(pointData, xval, yval, mode, fullLayout._hoverlayer);
385385
if(newPoints) {
386386
var newPoint;
387387
for(var newPointNum = 0; newPointNum < newPoints.length; newPointNum++) {

src/traces/contour/hover.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
var heatmapHoverPoints = require('../heatmap/hover');
1313

14-
15-
module.exports = function hoverPoints(pointData, xval, yval, hovermode) {
16-
return heatmapHoverPoints(pointData, xval, yval, hovermode, true);
14+
module.exports = function hoverPoints(pointData, xval, yval, hovermode, hoverLayer) {
15+
return heatmapHoverPoints(pointData, xval, yval, hovermode, hoverLayer, true);
1716
};

src/traces/heatmap/hover.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var Axes = require('../../plots/cartesian/axes');
1515

1616
var MAXDIST = Fx.constants.MAXDIST;
1717

18-
module.exports = function hoverPoints(pointData, xval, yval, hovermode, contour) {
18+
module.exports = function hoverPoints(pointData, xval, yval, hovermode, hoverLayer, contour) {
1919
// never let a heatmap override another type as closest point
2020
if(pointData.distance < MAXDIST) return;
2121

src/traces/histogram2d/hover.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
var heatmapHover = require('../heatmap/hover');
1313
var hoverLabelText = require('../../plots/cartesian/axes').hoverLabelText;
1414

15-
module.exports = function hoverPoints(pointData, xval, yval, hovermode, contour) {
16-
var pts = heatmapHover(pointData, xval, yval, hovermode, contour);
15+
module.exports = function hoverPoints(pointData, xval, yval, hovermode, hoverLayer, contour) {
16+
var pts = heatmapHover(pointData, xval, yval, hovermode, hoverLayer, contour);
1717

1818
if(!pts) return;
1919

0 commit comments

Comments
 (0)