Reactivate forced viz updates from sampler broadcasts in hist display loop
parent
afd0781b62
commit
3639f360c3
|
@ -248,25 +248,27 @@ async def increment_history_view(
|
||||||
# - samplerd could emit the actual update range via
|
# - samplerd could emit the actual update range via
|
||||||
# tuple and then we only enter the below block if that
|
# tuple and then we only enter the below block if that
|
||||||
# range is detected as in-view?
|
# range is detected as in-view?
|
||||||
if (
|
match msg:
|
||||||
(bf_wut := msg.get('backfilling', False))
|
case {
|
||||||
):
|
'backfilling': (viz_name, timeframe),
|
||||||
viz_name, timeframe = bf_wut
|
} if (
|
||||||
if (
|
|
||||||
viz_name == name
|
viz_name == name
|
||||||
|
):
|
||||||
|
log.warning(
|
||||||
|
f'Forcing HARD REDRAW:\n'
|
||||||
|
f'name: {name}\n'
|
||||||
|
f'timeframe: {timeframe}\n'
|
||||||
|
)
|
||||||
# TODO: only allow this when the data is IN VIEW!
|
# TODO: only allow this when the data is IN VIEW!
|
||||||
# also, we probably can do this more efficiently
|
# also, we probably can do this more efficiently
|
||||||
# / smarter by only redrawing the portion of the
|
# / smarter by only redrawing the portion of the
|
||||||
# path necessary?
|
# path necessary?
|
||||||
and False
|
{
|
||||||
):
|
60: hist_viz,
|
||||||
log.info(f'Forcing hard redraw -> {name}@{timeframe}')
|
1: viz,
|
||||||
match timeframe:
|
}[timeframe].update_graphics(
|
||||||
case 60:
|
force_redraw=True
|
||||||
hist_viz.update_graphics(force_redraw=True)
|
)
|
||||||
case 1:
|
|
||||||
viz.update_graphics(force_redraw=True)
|
|
||||||
|
|
||||||
# check if slow chart needs an x-domain shift and/or
|
# check if slow chart needs an x-domain shift and/or
|
||||||
# y-range resize.
|
# y-range resize.
|
||||||
|
|
Loading…
Reference in New Issue