Skip to content

Commit

Permalink
Using zoom_together='none' in wheel zoom by default for bokeh>=3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jlstevens committed Jul 5, 2023
1 parent 702c4a3 commit 6bf6d03
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion holoviews/plotting/bokeh/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
)
from .tabular import TablePlot
from .util import (
TOOL_TYPES, bokeh_version, bokeh3, date_to_integer, decode_bytes, get_tab_title,
TOOL_TYPES, bokeh_version, bokeh3, bokeh32, date_to_integer, decode_bytes, get_tab_title,
glyph_order, py2js_tickformatter, recursive_model_update,
theme_attr_json, cds_column_replace, hold_policy, match_dim_specs,
compute_layout_properties, wrap_formatter, match_ax_type,
Expand Down Expand Up @@ -316,6 +316,12 @@ def _init_tools(self, element, callbacks=[]):
if tl in ['vline', 'hline'] else tl for tl in tool_list
]

if bokeh32:
tool_list = [
tools.WheelZoomTool(zoom_together='none', tags=['hv_created'])
if tl in ['wheel_zoom', 'xwheel_zoom', 'ywheel_zoom'] else tl for tl in tool_list
]

copied_tools = []
for tool in tool_list:
if isinstance(tool, tools.Tool):
Expand Down
1 change: 1 addition & 0 deletions holoviews/plotting/bokeh/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

bokeh_version = Version(bokeh.__version__)
bokeh3 = bokeh_version >= Version("3.0")
bokeh32 = bokeh_version >= Version("3.2")

if bokeh3:
from bokeh.layouts import group_tools
Expand Down

0 comments on commit 6bf6d03

Please sign in to comment.