Lol, initial size calcs on order line update

fsp_feeds
Tyler Goodlet 2021-08-10 17:01:46 -04:00
parent 5528e80c22
commit 4ddfea654b
1 changed files with 12 additions and 3 deletions

View File

@ -204,15 +204,24 @@ class LevelLine(pg.InfiniteLine):
def on_tracked_source( def on_tracked_source(
self, self,
x: int, x: int,
y: float y: float
) -> None: ) -> None:
# XXX: this is called by our ``Cursor`` type once this '''Chart coordinates cursor tracking callback.
# line is set to track the cursor: for every movement
# this callback is invoked to reposition the line 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.movable = True
self.set_level(y) # implictly calls reposition handler self.set_level(y) # implictly calls reposition handler
self._chart.linked.godwidget.pp_config.model.get_order_info(
price=y
)
def mouseDragEvent(self, ev): def mouseDragEvent(self, ev):
"""Override the ``InfiniteLine`` handler since we need more """Override the ``InfiniteLine`` handler since we need more
detailed control and start end signalling. detailed control and start end signalling.