Skip to content

Commit cc9b695

Browse files
committed
Fixed a bug where event data in scatter3d charts was always undefined
1 parent 642c034 commit cc9b695

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/plots/gl3d/scene.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,6 @@ proto.render = function() {
332332
return Axes.hoverLabelText(ax, val, hoverformat);
333333
}
334334

335-
var oldEventData;
336-
337335
if(lastPicked !== null) {
338336
var pdata = project(scene.glplot.cameraParams, selection.dataCoordinate);
339337
trace = lastPicked.data;
@@ -456,10 +454,11 @@ proto.render = function() {
456454
gd.emit('plotly_hover', eventData);
457455
}
458456

459-
oldEventData = eventData;
457+
this.oldEventData = eventData;
460458
} else {
461459
Fx.loneUnhover(svgContainer);
462-
gd.emit('plotly_unhover', oldEventData);
460+
gd.emit('plotly_unhover', this.oldEventData);
461+
this.oldEventData = undefined;
463462
}
464463

465464
scene.drawAnnotations(scene);

0 commit comments

Comments
 (0)