Closed Joe-Chapman closed 9 years ago
My main goal during this was to change the behavior in multi-cursor mode so that right-clicking individual cursors mode would hide them. While doing this, I also removed the behavior where clicking off the graph with any mouse click removes all annotations. 'd' still hides them all. There would no longer be a way to hide all datacursors from the mouse alone without individually clicking, but is that a desirable use-case?
I tested to make sure that I did not change the behavior of the hover and highlighting modes. I wasn't horribly thorough, but they seemed to behave the same under the latest 2.7 build of anaconda.
This is helpful for creating something like a more deliberate "ginput" function by grabbing all visible annotations after the user has interacted with the graph.
Thanks for this! (I'm also replying to your e-mail, as well.)
However, it looks like you might have left out some commits from this pull request?
I actually squashed the changes into a single commit (not through git). There was already code in datacursor to hide annotations on right-click, it's just that that code was never reached since the annotations were not pickable (I fixed that). The second issue was that the "hide everything" behavior was being triggered on all clicks. Now it should only be triggered in hover mode when not hovering over anything, or when the user presses 'd'.
Sorry about that, I was glancing at the line if not any(over_something) and self.hover:
and somehow didn't see the definition of over_something
a couple of lines before. I just assumed it was in a previous commit that somehow got left out.
Either way, thanks again for the fix!
...and fixed a constructor bug.