From 27ba57217a5f6825e3c353baaefc99e37cbee642 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 10 Aug 2021 17:01:46 -0400 Subject: [PATCH] Lol, initial size calcs on order line update --- piker/ui/_lines.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/piker/ui/_lines.py b/piker/ui/_lines.py index e94d1b8c..8ba1636e 100644 --- a/piker/ui/_lines.py +++ b/piker/ui/_lines.py @@ -204,15 +204,24 @@ class LevelLine(pg.InfiniteLine): def on_tracked_source( self, + x: int, y: float + ) -> None: - # XXX: this is called by our ``Cursor`` type once this - # line is set to track the cursor: for every movement - # this callback is invoked to reposition the line + '''Chart coordinates cursor tracking callback. + + this is called by our ``Cursor`` type once this line is set to + track the cursor: for every movement this callback is invoked to + reposition the line + ''' self.movable = True self.set_level(y) # implictly calls reposition handler + self._chart.linked.godwidget.pp_config.model.get_order_info( + price=y + ) + def mouseDragEvent(self, ev): """Override the ``InfiniteLine`` handler since we need more detailed control and start end signalling.