You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the user changes tabs, a callback is set to make a property stored in window equal to whether the control or command key was pressed in the window when a click happens. Now, the TapTool callback has access to this property in window.
Problem description
I am trying to make a tap tool with two different behaviors depending on whether the user is clicking on a point or control + clicking a point.
I would like this so that the user can tap for one type of behavior, but also control + click to open a URL associated with the point.
My example to start with that does not have this feature, it just opens the link when you press the points:
I want to adjust the callback code to be something like this:
Feature description
Create a variable in CustomJS that can communicate the type of click.
Potential alternatives
One potential alternative is a custom extension.
I came up with a workaround that does not use a custom extension, which I am sure is not ideal:
When the user changes tabs, a callback is set to make a property stored in
window
equal to whether the control or command key was pressed in the window when a click happens. Now, the TapTool callback has access to this property inwindow
.Additional information
I am using Bokeh 2.4.2 in the examples.
This is based on the bokeh discourse discussion How to see if user shift clicked or control clicked or command clicked on Tap Tool javascript callback
Thanks in advance!
The text was updated successfully, but these errors were encountered: