diff options
Diffstat (limited to 'tawindow.py')
-rw-r--r-- | tawindow.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tawindow.py b/tawindow.py index 9cbb9db..5e7fcae 100644 --- a/tawindow.py +++ b/tawindow.py @@ -344,6 +344,11 @@ def mouse_move(tw, x, y, verbose=False, mdx=0, mdy=0): tw.draggroup = findgroup(find_top_block(spr)) else: tw.draggroup = findgroup(spr) + # check to see if any block ends up with a negative x + for b in tw.draggroup: + if b.x+dx < 0: + dx += -(b.x+dx) + # move the stack for b in tw.draggroup: move(b,(b.x+dx, b.y+dy)) elif spr.type=='turtle': |