Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to set active tools #3251

Merged
merged 3 commits into from Dec 7, 2018

Conversation

Projects
None yet
2 participants
@philippjfr
Copy link
Contributor

philippjfr commented Dec 3, 2018

This PR provides control over the active tools on a plot via the active_tools option which should be a list of tools that will be activated. The list can be specified as strings or as the tool instances being activated.

Note that currently bokeh does not allow setting active tools for a merged toolbar, so for the option to work on a Layout or Grid the merge_tools option has to be disabled.

  • Fixes #2730
  • Adds unit tests
  • Updates existing example to make use of the option
@@ -39,6 +40,46 @@
bokeh_version = LooseVersion(bokeh.__version__) # noqa


TOOL_TYPES = {

This comment has been minimized.

@jlstevens

jlstevens Dec 3, 2018

Contributor

Shame we have to list the names like this. It would be good to get this from bokeh if possible. And if it isn't possible, I feel like this is information bokeh ought to provide...

This comment has been minimized.

@philippjfr

philippjfr Dec 6, 2018

Author Contributor

I prefer to list these explicitly, at least for now. In my next bokeh tool PR I might bring up adding this directly to bokeh.

@philippjfr philippjfr force-pushed the active_tools branch 2 times, most recently from de39bdd to 31cb6ee Dec 3, 2018

@philippjfr philippjfr force-pushed the active_tools branch from 31cb6ee to 2f41495 Dec 6, 2018

@jlstevens

This comment has been minimized.

Copy link
Contributor

jlstevens commented Dec 7, 2018

Very happy to finally be able to have this long requested feature! Merging.

@jlstevens jlstevens merged commit 964b82f into master Dec 7, 2018

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
s3-reference-data-cache Test data is cached.
Details

@philippjfr philippjfr deleted the active_tools branch Dec 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
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.