Skip to content

Commit f19033f

Browse files
author
John Soklaski
committed
Support hoverinfo skip for gl2d and gl3d plots
1 parent acb23c7 commit f19033f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/plots/gl2d/scene2d.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ proto.draw = function() {
478478
(y / glplot.pixelRatio) - (size.t + (1 - domainY[1]) * size.h)
479479
);
480480

481-
if(result && fullLayout.hovermode) {
481+
if(result && result.object._trace.hoverinfo !== 'skip' && fullLayout.hovermode) {
482482
var nextSelection = result.object._trace.handlePick(result);
483483

484484
if(nextSelection && (
@@ -488,6 +488,7 @@ proto.draw = function() {
488488
this.lastPickResult.dataCoord[1] !== nextSelection.dataCoord[1])
489489
) {
490490
var selection = nextSelection;
491+
491492
this.lastPickResult = {
492493
traceUid: nextSelection.trace ? nextSelection.trace.uid : null,
493494
dataCoord: nextSelection.dataCoord.slice()

src/plots/gl3d/scene.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function render(scene) {
5050
var selection = scene.glplot.selection;
5151
for(var i = 0; i < keys.length; ++i) {
5252
trace = scene.traces[keys[i]];
53-
if(trace.handlePick(selection)) {
53+
if(trace.data.hoverinfo !== 'skip' && trace.handlePick(selection)) {
5454
lastPicked = trace;
5555
}
5656

0 commit comments

Comments
 (0)