Skip to content

Commit

Permalink
Merge pull request #201 from pyiron/panning_bug
Browse files Browse the repository at this point in the history
Offset moved objects by canvas position
  • Loading branch information
liamhuber authored May 16, 2023
2 parents bcf71a6 + ecc1e2a commit 13dbea3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ironflow/gui/workflows/canvas_widgets/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 13dbea3

Please sign in to comment.