From ecc1e2a915a7ed27fb6abe37c8bc4d28ceb6a789 Mon Sep 17 00:00:00 2001 From: liamhuber Date: Tue, 16 May 2023 15:06:09 -0700 Subject: [PATCH] Offset moved objects by canvas position --- ironflow/gui/workflows/canvas_widgets/flow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ironflow/gui/workflows/canvas_widgets/flow.py b/ironflow/gui/workflows/canvas_widgets/flow.py index 4e57c707..9baf0d1e 100644 --- a/ironflow/gui/workflows/canvas_widgets/flow.py +++ b/ironflow/gui/workflows/canvas_widgets/flow.py @@ -193,7 +193,7 @@ def handle_mouse_move(self, x: Number, y: Number) -> None: selected_objects = self.get_selected_objects() if len(selected_objects) > 0: with hold_canvas(self._canvas): - [o.set_x_y(x, y) for o in selected_objects] + [o.set_x_y(x - self.x, y - self.y) for o in selected_objects] self.redraw() else: self.x += x - self._x_move_anchor