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
Merged

Add ability to set active tools #3251

merged 3 commits into from Dec 7, 2018

Conversation

@philippjfr
Copy link
Member

@philippjfr 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 Member

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
Copy link
Contributor

@jlstevens 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
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
@philippjfr
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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants