Skip to content

Commit

Permalink
Make resetting limits be immediate
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog committed Oct 29, 2024
1 parent 7e3ab43 commit dd84dbf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions glue_jupyter/bqplot/image/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ def __init__(self, session, compression='png'):
on_change([(self.state, 'aspect')])(self._sync_figure_aspect)
self._sync_figure_aspect()

def _update_bqplot_limits(self, *args, **kwargs):
# When the user explicitly changes the limits, we want the update to
# be immediate - debouncing should be ideally used mostly for preventing
# many successive updates from the front-end, e.g. when panning, but
# programmatically changing things should be immediate.
super()._update_bqplot_limits(*args, **kwargs)
if hasattr(self, '_composite_image'):
self._composite_image.update()

def _update_axes(self, *args):

if self.state.x_att_world is not None:
Expand Down

0 comments on commit dd84dbf

Please sign in to comment.