Skip to content

Commit

Permalink
Return in_view: bool from Viz.update_graphics()
Browse files Browse the repository at this point in the history
Allows callers to know if they should care about a particular viz
rendering call by immediately knowing if the graphics are in view. This
turns out super useful particularly when doing dynamic y-ranging overlay
calcs.
  • Loading branch information
goodboy committed Feb 3, 2023
1 parent 28aaaf9 commit 325fe3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion piker/ui/_dataviz.py
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ def default_view(

else:
log.warning(f'Unknown view state {vl} -> {vr}')
return
# return
# raise RuntimeError(f'Unknown view state {vl} -> {vr}')

else:
Expand Down
2 changes: 1 addition & 1 deletion piker/ui/_fsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ async def open_vlm_displays(

last_val_sticky.update_from_data(-1, value)

_, vlm_curve = vlm_viz.update_graphics()
_, _, vlm_curve = vlm_viz.update_graphics()

# size view to data once at outset
vlm_chart.view._set_yrange(
Expand Down

0 comments on commit 325fe3c

Please sign in to comment.