-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Do not attempt to re-hover on exiting subplots #4269
Conversation
To include in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good to me.
💃
@etpinard I only have one question.
Please find my comment below.
Nice 🎉 presumably this works for disappearing non-cartesian subplots as well as cartesian? |
Presumably, we shouldn't be calling Thanks for the tip! I'll double-check if something similar happens to mapbox subplots before merging this PR. |
that's not the implication of these comments... anyway regardless of the eventual fix, the test is pretty clear, hover on a subplot of each type while it disappears. Seems a bit overkill for a very simple fix though, also I've never seen users complaining about this with anything but cartesian. But it would be nice to have at least manually tested that this works. plotly.js/src/components/fx/hover.js Lines 227 to 241 in 25fe1c9
|
@archmoj this PR is ready for a 2nd round of review. |
yaArray[i] = Axes.getFromId(gd, plotObj.yaxis._id); | ||
continue; | ||
xaArray[i] = plots[spId].xaxis; | ||
yaArray[i] = plots[spId].yaxis; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gd._fullLayout._plots[/* subplot id */].(x|y).axis
is now always filled in properly thanks for Plots.linkSubplots
called during Plots.supplyDefaults
.
That TODO
comment above was over three years old.
Excellent. |
hopefully fixes #4157 and related
Cannot read _subplot of undefined
issues.@plotly/plotly_js this bug has been plaguing dash users for some times now (see https://community.plot.ly/t/dash-app-with-js-clientside-callback-sometimes-crashes/29599/5 for a reproducible case).