This adds a selection callback to be used with the box select or lasso select tools.
tool_selection(fig, callback, ref_layer)
figure to modify
a callback to be applied to this tool - either a character string of javascript code or any one of debug_callback
, shiny_callback
, console_callback
, custom_callback
name of the layer that the callback should be applied to