Skip to content

[BUG] RangesUpdate not emitted when using xwheel_pan #11633

Closed

Description

@alexbjorling

The following code triggers the RangesUpdate event when using all the pan/zoom/reset tools, except for the xwheel_pan and ywheel_pan ones. I suspect this is not the intended behavior.

from bokeh.plotting import figure, curdoc
from bokeh.events import RangesUpdate

p = figure(tools=('xwheel_zoom', 'ywheel_zoom', 'xwheel_pan', 'ywheel_pan',
                  'box_zoom', 'pan', 'reset'))
p.line([1,2], [4,3])
p.on_event(RangesUpdate, lambda evt: print(evt))
curdoc().add_root(p)

This is bokeh 2.4.0, Python 3.9.7, Ubuntu 21.04.

Activity

  1. added this to the 3.0 milestone on Sep 17, 2021
  2. bryevdv commented on Sep 17, 2021

    @bryevdv
    Member

    I'm sure it needs a call to

    this.plot_view.trigger_ranges_update_event()
    

    added. Quite honestly forget these tools exist, I still don't quite understand the point of a wheel pan. Triaging to land on branch-3.0 since there's already several backports to 2.4.1 this can just be included in one batch.

  3. bryevdv commented on Sep 17, 2021

    @bryevdv
    Member

    @alexbjorling if you are interested to make a stab at a PR, you can see how other tools trigger the update:

    https://github.com/bokeh/bokeh/search?q=trigger_ranges_update_event

    Things should be very similar inside https://github.com/bokeh/bokeh/blob/branch-3.0/bokehjs/src/lib/models/tools/gestures/wheel_pan_tool.ts

  4. alexbjorling commented on Sep 17, 2021

    @alexbjorling
    ContributorAuthor

    Oh, for what I'm writing now the wheel pan is perfect. I have a waterfall 2d plot showing vibrational spectra over time. You pan the time axis, and this event causes data from the new time range to be read from the database and shown.

    Put in PR #11634, hope it's OK!

  5. modified the milestones: 3.0, 2.4.1 on Sep 27, 2021
  6. github-actions commented on Oct 26, 2024

    @github-actions

    This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  7. locked as resolved and limited conversation to collaborators on Oct 26, 2024
  8. added theissue type on Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions