rationalmatter / Juno-Issue-Tracker

Defect Tracker for Juno
79 stars 1 forks source link

xwheel_pan does not do anything #425

Open kkonolige opened 3 months ago

kkonolige commented 3 months ago

Describe the bug Adding xwheel_pan to the tools argument of figure puts the tool on the toolbar, but it doesn’t pan or do anything.

To Reproduce Here’s my code for a Jupyter notebook:

import bokeh.plotting.figure as bk_figure
from bokeh.io import show, output_notebook
from bokeh.models import ColumnDataSource

# enable notebook figures
output_notebook()

plot = bk_figure(plot_height=400, plot_width=600, title='Test xwheel panning',
                 tools='xwheel_pan, pan, xwheel_zoom',
                 active_scroll='xwheel_pan',
                 x_range=[3.5, 5.5],
                 toolbar_location='above')

source = ColumnDataSource(data=dict(x=[1,2,3,4,5,6],y=[1,2,3,4,5,6]))
p = plot.line('x', 'y', source=source, line_width=3)
show(plot)

Expected behavior Expect the xhweel_pan tool to scroll in the x direction with a scrolling gesture. Doesn’t do anything. Selecting pan does pan with the drag gesture; selecting xwheel_zoom zooms with the scrolling gesture. Note: taking out the other tools does not enable xwheel_pan to work.

Screenshots Should be able to reproduce with the above code.

Environment (please complete the following information):

alexstaravoitau commented 2 months ago

Thanks for reporting @kkonolige — I'm planning to upgrade a few of the pinned packages soon, bokeh included. I'll see if there's a quick workaround for this.