Skip to content

Add mouse event to plotly_click, plotly_hover and plotly_unhover #1505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Mar 30, 2017
2 changes: 1 addition & 1 deletion src/plots/cartesian/graph_interact.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ function hover(gd, evt, subplot) {

// [x|y]px: the pixels (from top left) of the mouse location
// on the currently selected plot area
var hasUserCalledHover = ('xpx' in evt || 'ypx' in evt),
var hasUserCalledHover = !evt.target,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which test(s) broke while ('xpx' in evt || 'ypx' in evt)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fx.hover('graph', evt, 'xy');

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Good to know!

xpx, ypx;

if(hasUserCalledHover) {
Expand Down