Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt/tawindow.py
diff options
context:
space:
mode:
Diffstat (limited to 'TurtleArt/tawindow.py')
-rw-r--r--TurtleArt/tawindow.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py
index 2a1117b..0569bd0 100644
--- a/TurtleArt/tawindow.py
+++ b/TurtleArt/tawindow.py
@@ -2434,8 +2434,6 @@ before making changes to your Turtle Blocks program'))
def _turtle_pressed(self, x, y):
pos = self.selected_turtle.get_xy()
tpos = self.turtles.turtle_to_screen_coordinates(pos)
- w = self.selected_turtle.half_width
- h = self.selected_turtle.half_height
dx = x - tpos[0]
dy = y - tpos[1]
if not hasattr(self.lc, 'value_blocks'):
@@ -2443,7 +2441,7 @@ before making changes to your Turtle Blocks program'))
self.lc.update_values = True
# Compare distance squared of drag position to sprite radius.
# If x, y is near the edge, rotate.
- if (dx * dx) + (dy * dy) > ((w * w) + (h * h)) / 6:
+ if (dx * dx) + (dy * dy) > self.selected_turtle.get_drag_radius():
self.drag_turtle = (
'turn',
self.selected_turtle.get_heading() - atan2(dy, dx) / DEGTOR,