What I want to do:
I want to use the box select tool to drag a box around some rectangles with greedy mode and continuous mode on.
Once I’ve got my boxes selected:
I want to hold down ctrl and click boxes to drop them from my selection if they are selected already.
if they are not selected already, I want to add them to my selection.
If i Have no boxes selected yet, I would like to select the box being ctrl + clicked.
If I hold shift and drag another box, I’d like any glyphs I hit to be added to my selection.
If I hold control and drag a box I’d like any glyphs I hit that are already selected to be dropped, and any glyphs I haven’t selected to be added to my selection.
If I regular left click outside of any glyph, I’d like my selection to be cleared.
If I regular left click on any glyph replace my selection with just that one glyph I clicked
I tried to accomplish this with the box select and tap tool turned on at the same time, but the control and shift clicks behave in a manner I don’t understand.
from bokeh.plotting import figure, show, output_file
from bokeh.models import BoxZoomTool,ResetTool,LassoSelectTool,PanTool,BoxSelectTool,WheelZoomTool,TapTool,Tap
p = figure(width=400, height=400
, tools=[
BoxZoomTool(match_aspect=True)
, ResetTool()
, PanTool()
, WheelZoomTool()
, BoxSelectTool(continuous=True, greedy=True)
, 'tap'
]
)
p.quad(top=[2, 3, 4], bottom=[1, 2, 3], left=[1, 2, 3],
right=[1.2, 2.5, 3.7], color="#B3DE69")
output_file(filename="custom_filename.html", title="Static HTML file")
show(p)
What I’ve read so far:
“Toggle selection of objects with shift+click”
" Allow to configure selection tool mode"