Skip to content

Commit

Permalink
Fixed component positioning bug
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSekavcnik committed Apr 29, 2024
1 parent e2e6095 commit 91ee36f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions quasi/gui/board/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def move_board(self, e):
self.offset_x += e.delta_x
self.offset_y += e.delta_y


self.canvas_container.top = min(
self.canvas_container.top + e.delta_y,
0)
Expand All @@ -118,6 +119,10 @@ def move_board(self, e):
0)
self.content.top = min(self.content.top + e.delta_y, 0)
self.content.left = min(self.content.left + e.delta_x, 0)

self.offset_x = min(self.offset_x, 0)
self.offset_y = min(self.offset_y, 0)
print(f"{self.offset_x},{self.offset_y}")
self.content.update()
self.canvas_container.update()

Expand Down

0 comments on commit 91ee36f

Please sign in to comment.