Disable tools using custom JS event

Hi,

Is it possible to disable (or toggle to inactive/off) any/all currently active tools when a custom event (i.e. double click in the plot area) occurs? I’ve written a customJS event that unzooms the plot when double-clicked in the plot area but it can be pretty slow when the hover tool is enabled and I would like to toggle the hover tool to off just before I emit the event.

Many thanks,

Lukasz

Hi,

Tools have a .active property:

  CustomJS(args=dict(hover=hover), code="hover.active = !hover.active")

Thanks,

Bryan

···

On Aug 6, 2018, at 03:51, [email protected] wrote:

Hi,

Is it possible to disable (or toggle to inactive/off) any/all currently active tools when a custom event (i.e. double click in the plot area) occurs? I've written a customJS event that unzooms the plot when double-clicked in the plot area but it can be pretty slow when the hover tool is enabled and I would like to toggle the hover tool to off just before I emit the event.

Many thanks,
Lukasz

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/da09feb2-6fd8-43f7-bbeb-fddf32e3a29c%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.