Ni! I’d like to have a plot zoom in and out with pinching on a touchscreen.
According to https://docs.bokeh.org/en/latest/docs/user_guide/interaction/tools.html#scroll-pinch-tools , wheelzoomtool is supposed to enable pinching, but while scrolling zooms fine pinching has no effect other than the browser’s default action of zooming the viewport.
Am I missing something?
Best!
Bryan
January 11, 2023, 5:36pm
2
Seems like a recent regression. Please open a GitHub Issue
1 Like
Filing the issue I tested on a different browser I have installed (Gnome Web, i.e. WebKitGTK 2.36.8) and the result was different but also not the expected behavior. All details are in the issue:
opened 05:51PM - 11 Jan 23 UTC
TRIAGE
### Software versions
Python version : 3.9.9 (main, Jan 1 1970, 00:00:01… )
IPython version : 8.2.0
Tornado version : 5.1.1
Bokeh version : 3.0.3
BokehJS static path : /home/eris/.local/lib/python3.9/site-packages/bokeh/server/static
node.js version : (not installed)
npm version : (not installed)
Operating system : Linux-6.0.16-x86_64-with-glibc2.33
### Browser name and version
Different behaviors in Firefox (108.0.1 (64-bit)) and Webkit (WebKitGTK 2.36.8)
### Jupyter notebook / Jupyter Lab version
_No response_
### Expected behavior
Active Wheelzoom should enable zoom on pinch and avoid the browsers default action of zooming the viewport.
In other words: zooming YES, viewport zoomed NO.
### Observed behavior
On Firefox (108.0.1 (64-bit)): zooming NO, viewport zoomed YES.
On Webkit (WebKitGTK 2.36.8): zooming YES, viewport zoomed YES.
### Example code
```Python
from bokeh.models import ColumnDataSource
from bokeh.plotting import figure, output_file, save
cds = ColumnDataSource(
dict(
x=[0],
y=[0],
w=[1],
h=[1],
)
)
fig = figure(
x_range=(-2, 2),
y_range=(-2, 2),
width=800,
height=600,
tools=['ywheel_zoom'],
active_scroll="ywheel_zoom",
)
fig.rect(
x="x",
y="y",
width="w",
height="h",
source=cds,
)
output_file("test_pinch_screen.html", mode="inline")
save(fig)
```
### Stack traceback or browser console output
_No response_
### Screenshots
_No response_
Thanks!
1 Like
system
Closed
April 11, 2023, 5:55pm
5
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.