Closed
Description
Current behavior
The plotly_unhover
callback function only ever appears to receive undefined
as an argument. Here's a codepen. Check the console for unhover data value.
Expected behavior
According to the event reference docs, it looks like the unhover callback should receive data on the point being unhovered.
Possible cause
Looking at the proto.render
function in https://github.com/plotly/plotly.js/blob/master/src/plots/gl3d/scene.js, it looks like the unhover event gets passed a reference to oldEventData
, but oldEventData
does not get initialized in this path. Instead, it's set in the path that handles plotly_hover
and plotly_click
.
Perhaps oldEventData
is meant to be stored as a member of the proto.render
function so it can be accessed later for the unhover event?
proto.render = function() {
// ...
if(lastPicked !== null) {
// ...
this.oldEventData = eventData;
} else {
Fx.loneUnhover(svgContainer);
gd.emit('plotly_unhover', this.oldEventData);
this.oldEventData = undefined;
}
};
Metadata
Metadata
Assignees
Labels
No labels