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

[BUG] Lack of range expansion when there remains unbounded directions, even when maintain_focus=False #13827

Open
droumis opened this issue Apr 16, 2024 · 0 comments
Labels

Comments

@droumis
Copy link
Member

droumis commented Apr 16, 2024

Software versions

Python version : 3.11.8 | packaged by conda-forge | (main, Feb 16 2024, 20:49:36) [Clang 16.0.6 ]
IPython version : 8.22.2
Tornado version : 6.4
Bokeh version : 3.4.0
BokehJS static path : /Users/droumis/opt/miniconda3/envs/holoviews-6056/lib/python3.11/site-packages/bokeh/server/static
node.js version : v21.7.1
npm version : 10.5.0
jupyter_bokeh version : 4.0.1
Operating system : macOS-13.5.2-arm64-arm-64bit

Browser name and version

chrome Version 123.0.6312.105

Jupyter notebook / Jupyter Lab version

jupyterlab 4.1.6

Expected behavior

If maintain_focus is False, and so you don't care about keeping the cursor point consistent, then the wheel zoom out should be like a flood fill, expanding in every remaining unbounded direction.

The example below is not quite 'zooming' in this particular view... but just to demo the behavior of x-upper-range expanding even when the left, upper, lower bounds are reached:

Screen.Recording.2024-04-15.at.4.58.20.PM.mov

Observed behavior

In the video below, when the left, top, and bottom bounds are hit, the wheel zoom no longer continues to adjust in the x-upper-direction (right). Alternatively, one cannot zoom out at all in the y-dim if the x-dim bounds are fully reached from the start, such with x_range=Range1d(bounds=(1, 5), start=1, end=5).

Example code

from bokeh.models import Range1d, WheelZoomTool
from bokeh.plotting import figure, show

x = [1, 2, 3, 4, 5]
y = [6, 7, 2, 4, 5]

p = figure(x_range=Range1d(bounds=(1, 5), start=1, end=2),
           y_range=Range1d(bounds=(2, 7), start=4, end=6.5),tools="reset,pan,")
p.line(x, y)
wheel_zoom = WheelZoomTool(maintain_focus=False) 
p.add_tools(wheel_zoom)
p.toolbar.active_scroll = wheel_zoom
show(p)

Stack traceback or browser console output

No response

Screenshots

Screen.Recording.2024-04-15.at.4.39.16.PM.mov
@droumis droumis added the TRIAGE label Apr 16, 2024
@droumis droumis changed the title [BUG] maintain_focus=False prevents range expansion when there remains an unbounded direction [BUG] maintain_focus=False prevents range expansion when there remains unbounded directions Apr 16, 2024
@droumis droumis changed the title [BUG] maintain_focus=False prevents range expansion when there remains unbounded directions [BUG] Lack of range expansion when there remains unbounded directions, even when maintain_focus=False Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant