I am trying to figure out event to assign callback for BoxSelectTool. I want to press the tool, then after selection is done, the callback is executed. I do not want to assign callback to source, as I have a tap tool which will be affected. In other words:
box_selection_tool = p1.select(dict(type=BoxSelectTool))[0]
box_selection_tool.js_on_event(PressUp, callback_for_box_selection)
The help is quite confusing:
The end of the drag event indicates the selection region is ready.
Are you after the selection geometry, i.e. the bounds of the box the use made? Or are you after the selection indices, i.e. a list of which points the box “hit”?
I fixed it, using selection indices and then checking for length of the array in callback - so i can use both tap and selection box tools. thank you for your time.