Rename `.maybe_downsample_graphics()` -> `.interact_graphics_cycle()`
parent
c505e9ac42
commit
5bfd850e4f
|
@ -1070,9 +1070,8 @@ class Viz(msgspec.Struct): # , frozen=True):
|
||||||
)
|
)
|
||||||
|
|
||||||
if do_ds:
|
if do_ds:
|
||||||
# view.interaction_graphics_cycle()
|
view.interact_graphics_cycle()
|
||||||
view.maybe_downsample_graphics()
|
# view._set_yrange(viz=self)
|
||||||
view._set_yrange(viz=self)
|
|
||||||
|
|
||||||
def incr_info(
|
def incr_info(
|
||||||
self,
|
self,
|
||||||
|
|
|
@ -509,7 +509,7 @@ class ChartView(ViewBox):
|
||||||
# return
|
# return
|
||||||
|
|
||||||
# actual scaling factor
|
# actual scaling factor
|
||||||
s = 1.015 ** (ev.delta() * -1 / 20) # self.state['wheelScaleFactor'])
|
s = 1.016 ** (ev.delta() * -1 / 20) # self.state['wheelScaleFactor'])
|
||||||
s = [(None if m is False else s) for m in mask]
|
s = [(None if m is False else s) for m in mask]
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
@ -565,8 +565,8 @@ class ChartView(ViewBox):
|
||||||
# that never seems to happen? Only question is how much this
|
# that never seems to happen? Only question is how much this
|
||||||
# "double work" is causing latency when these missing event
|
# "double work" is causing latency when these missing event
|
||||||
# fires don't happen?
|
# fires don't happen?
|
||||||
self.maybe_downsample_graphics()
|
self.interact_graphics_cycle()
|
||||||
self.maybe_downsample_graphics()
|
self.interact_graphics_cycle()
|
||||||
|
|
||||||
ev.accept()
|
ev.accept()
|
||||||
|
|
||||||
|
@ -674,7 +674,7 @@ class ChartView(ViewBox):
|
||||||
# self.sigRangeChangedManually.emit(mask)
|
# self.sigRangeChangedManually.emit(mask)
|
||||||
# self.state['mouseEnabled']
|
# self.state['mouseEnabled']
|
||||||
# )
|
# )
|
||||||
self.maybe_downsample_graphics()
|
self.interact_graphics_cycle()
|
||||||
|
|
||||||
if ev.isFinish():
|
if ev.isFinish():
|
||||||
self.signal_ic()
|
self.signal_ic()
|
||||||
|
@ -707,7 +707,7 @@ class ChartView(ViewBox):
|
||||||
self.scaleBy(x=x, y=y, center=center)
|
self.scaleBy(x=x, y=y, center=center)
|
||||||
|
|
||||||
# self.sigRangeChangedManually.emit(self.state['mouseEnabled'])
|
# self.sigRangeChangedManually.emit(self.state['mouseEnabled'])
|
||||||
self.maybe_downsample_graphics()
|
self.interact_graphics_cycle()
|
||||||
|
|
||||||
# XXX: WHY
|
# XXX: WHY
|
||||||
ev.accept()
|
ev.accept()
|
||||||
|
@ -865,19 +865,19 @@ class ChartView(ViewBox):
|
||||||
# - only register this when certain downsample-able graphics are
|
# - only register this when certain downsample-able graphics are
|
||||||
# "added to scene".
|
# "added to scene".
|
||||||
# src_vb.sigRangeChangedManually.connect(
|
# src_vb.sigRangeChangedManually.connect(
|
||||||
# self.maybe_downsample_graphics
|
# self.interact_graphics_cycle
|
||||||
# )
|
# )
|
||||||
|
|
||||||
# widget-UIs/splitter(s) resizing
|
# widget-UIs/splitter(s) resizing
|
||||||
src_vb.sigResized.connect(
|
src_vb.sigResized.connect(
|
||||||
self.maybe_downsample_graphics
|
self.interact_graphics_cycle
|
||||||
)
|
)
|
||||||
|
|
||||||
def disable_auto_yrange(self) -> None:
|
def disable_auto_yrange(self) -> None:
|
||||||
|
|
||||||
# XXX: not entirely sure why we can't de-reg this..
|
# XXX: not entirely sure why we can't de-reg this..
|
||||||
self.sigResized.disconnect(
|
self.sigResized.disconnect(
|
||||||
self.maybe_downsample_graphics
|
self.interact_graphics_cycle
|
||||||
)
|
)
|
||||||
|
|
||||||
def x_uppx(self) -> float:
|
def x_uppx(self) -> float:
|
||||||
|
@ -898,11 +898,11 @@ class ChartView(ViewBox):
|
||||||
else:
|
else:
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def maybe_downsample_graphics(
|
def interact_graphics_cycle(
|
||||||
self,
|
self,
|
||||||
):
|
):
|
||||||
profiler = Profiler(
|
profiler = Profiler(
|
||||||
msg=f'ChartView.maybe_downsample_graphics() for {self.name}',
|
msg=f'ChartView.interact_graphics_cycle() for {self.name}',
|
||||||
# disabled=not pg_profile_enabled(),
|
# disabled=not pg_profile_enabled(),
|
||||||
|
|
||||||
# ms_threshold=ms_slower_then,
|
# ms_threshold=ms_slower_then,
|
||||||
|
@ -927,6 +927,10 @@ class ChartView(ViewBox):
|
||||||
|
|
||||||
for chart_name, chart in plots.items():
|
for chart_name, chart in plots.items():
|
||||||
|
|
||||||
|
# Viz "group" maxmins table; presumes that some path
|
||||||
|
# graphics (and thus their backing data sets)
|
||||||
|
# are in the same co-domain and thus can be sorted
|
||||||
|
# as one set per plot.
|
||||||
mxmns: dict[
|
mxmns: dict[
|
||||||
pg.PlotItem,
|
pg.PlotItem,
|
||||||
tuple[float, float],
|
tuple[float, float],
|
||||||
|
|
Loading…
Reference in New Issue