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
tap tool on bokeh server does not select data points with a custom callback #6707
Comments
I can reproduce this on firefox, but not on safari. |
FYI the callback being fired with empty args is equivalent to "unselection", and is expected any time things are unselected. The callback fires based on the value of the selection, not based on just clicking or even hit-testing positive after a click. E.g. If something is already selected, and you click it again, there will be no selection change, and hence no callback. Or if you click in outside any glyph or hit esc to unselect, that changes to an empty selection, so there will be a callback with empty data. That said, it seems to be ignoring valid mouse hits on FF. |
I'm also encountering the bug in Safari: did you try clicking more than once? Sometimes intermittently one of the circles will select if you're clicking a lot. This happened to me once with Safari, but then I deselected and the other circle wouldn't select. |
I can reproduce on Google Chrome.
|
Update: Good call @p-himik, with Something with hit detection? Also, since whether or not the bug occurs depends on the size of the glyphs, reproducing might depend on the resolution of the display. |
Yes I clicked each circle several dozen times in various orders and it always triggered appropriately |
I updated the code to the current standard usage:
and tested on Chrome, FF, and Safari. The circles were a bit hard to hit (because they are tiny) but in every case the callback printed exactly what is expected. There were lots of issues previously with both the "dict" for selections, and also with Bokeh itself replacing whole |
Versions: Firefox 54.0.1 (64-bit) on macOS Sierra, 0.12.6
Expected behavior: With the tap tool, the user can select a data point and the specified callback will fire
Observed behavior: Callback fires intermittently with incorrect parameters, or does not fire at all
mwe.py
:bokeh serve --show mwe.py
Steps to reproduce
bokeh serve --show mwe.py
as aboveattr: selected old: {'0d': {'glyph': None, 'indices': []}, '1d': {'indices': []}, '2d': {'indices': {}}} new: {'0d': {'glyph': None, 'get_view': {}, 'indices': []}, '1d': {'indices': []}, '2d': {'indices': {}}}
The text was updated successfully, but these errors were encountered: