Skip to content

[FEATURE] Add consolidated RangeUpdate event #11095

@bryevdv

Description

@bryevdv

ref: https://stackoverflow.com/questions/66744548/how-do-i-use-add-next-tick-callback-for-a-panel-wrapped-bokeh-figure

For a long time many users have had a problem where they want one event for "total range change" (e.g. due to a pan or zoom) but as of now, can only set up on_change handlers on all the range start/end properties individually. This leads to triggering more callbacks than desired, and understandable attempts to implement fragile and ad-hoc debouncing schemes.

In the past there was not a good technical path to fixing this because we only had read/write properties available to trigger callbacks. Now that there are FnF events, I think a better solution is possible. Things that normally set multiple range values "all at once" (e.g. pan or zoom tools) could also emit a new RangesUpdate event after all the range values are updated. Then user code can register for a single RangesUpdate event, and look up all the updated values at once (alternatively, the event itself could transmit default range values).

Another option at this point could be a readonly property but I think an event is preferable.

cc @philippjfr @AjayThorve I think this is of interest to Panel and cuxfilter.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions