Return `in_view: bool` from `Viz.update_graphics()`
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.multichartz
parent
28aaaf9866
commit
325fe3cf14
|
@ -1061,7 +1061,7 @@ class Viz(msgspec.Struct): # , frozen=True):
|
||||||
|
|
||||||
else:
|
else:
|
||||||
log.warning(f'Unknown view state {vl} -> {vr}')
|
log.warning(f'Unknown view state {vl} -> {vr}')
|
||||||
return
|
# return
|
||||||
# raise RuntimeError(f'Unknown view state {vl} -> {vr}')
|
# raise RuntimeError(f'Unknown view state {vl} -> {vr}')
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -707,7 +707,7 @@ async def open_vlm_displays(
|
||||||
|
|
||||||
last_val_sticky.update_from_data(-1, value)
|
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
|
# size view to data once at outset
|
||||||
vlm_chart.view._set_yrange(
|
vlm_chart.view._set_yrange(
|
||||||
|
|
Loading…
Reference in New Issue