Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tawindow.py
diff options
context:
space:
mode:
Diffstat (limited to 'tawindow.py')
-rw-r--r--tawindow.py5
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':