Skip to content

Commit

Permalink
Addition to #6420, allow multiple crosshairs.
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-a-nygaard authored and TorsteinHonsi committed May 4, 2017
1 parent 9aaef50 commit b8c85dd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions js/parts/Pointer.js
Expand Up @@ -377,10 +377,12 @@ H.Pointer.prototype = {
var snap = pick(axis.crosshair.snap, true);
if (!snap) {
axis.drawCrosshair(e);
// axis has snapping crosshairs, and hover point is belonging to axis
} else if (hoverPoint && hoverPoint.series[axis.coll] === axis) {
// axis has snapping crosshairs, and one of the hover points is belongs to axis
} else if (H.find(points, function (p) {
return p.series[axis.coll] === axis;
})) {
axis.drawCrosshair(e, hoverPoint);
// axis has snapping crosshairs, but hover point is not belonging to axis
// axis has snapping crosshairs, but no hover point is not belonging to axis
} else {
axis.hideCrosshair();
}
Expand Down

0 comments on commit b8c85dd

Please sign in to comment.