question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Zooming out with bound ranges doesn't zoom all the way

See original GitHub issue

Bokeh version: 0.12.4

  1. set bounds='auto' on x_range and y_range range
  2. zoom in with mouse pointer near the lower left corner of the plot
  3. zoom out with mouse pointer near the upper right corner of the plot

Observed behavior: Plot is zoomed in just fine, but zooming out doesn’t bring the plot to the same state as before apparently because zooming in doesn’t try to move plot at all

Expected behavior: The plot moves as to both be inside the specified bounds and to be zoomed out up to the initial state when zooming out is no longer possible without breaking bounds contstraint.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

6reactions
p-himikcommented, Mar 26, 2018

In case people subscribed to this issue didn’t receive any notification - a flag to change the default behavior has been added in #7683.

2reactions
p-himikcommented, Mar 21, 2018

@bryevdv I just stumbled upon this again. I don’t think the reset tool is for this, at least because it does some other things as well. Another reason is that it may be really hard, if not impossible with the current state of things, to set up the desired state as the initial one.

I would suggest adding centered_zoom_in and centered_zoom_out parameters to WheelZoomTool. By default, they’re True and represent current behavior. Setting them to False would remove center argument for scale_range function for the appropriate case of zooming in or out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fixing boundaries for bokeh zoom-in and zoom-out
1 Answer 1 · it solves my first problem perfectly, thanks! · There is a maintain_focus property on the WheelZoomTool you could try...
Read more >
RTS style bounds that shrink as camera zooms out - Unity Forum
During zoom I would like to limit the camera's position so that it doesn't show the edges of the map. So when you...
Read more >
Leaflet maxBounds doesn't prevent zooming out
It seems incorrect behaviour to me. I need to prevent display of the map beyond given bounds, and thought maxBounds would do it....
Read more >
Zoom In/ Out to limit within integer values - Bokeh Discourse
I was wondering if there is a way to limit the zoom in/out to integer values so it doesn't go out of range?...
Read more >
zoom | CSS-Tricks
The zoom property in CSS allows you to scale your content. ... So your cmd/ctrl+? It doesn't work on elements with zoom: reset...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found