--- a/graphics/GraphicCommons.py Thu Feb 28 18:07:52 2008 +0100
+++ b/graphics/GraphicCommons.py Thu Feb 28 18:09:09 2008 +0100
@@ -289,7 +289,7 @@
self.Parent = parent
self.Id = id
self.oldPos = None
- self.Handle = False
+ self.Handle = (None,None)
self.Dragging = False
self.Selected = False
self.Highlighted = False
@@ -529,7 +529,7 @@
if handle[0] == 1:
movex = max(-self.BoundingBox.x, movex)
if scaling is not None:
- movex = round(float(self.Pos.x + movex) / float(scaling[0])) * scaling[0] - self.Pos.x
+ movex = -(round(float(width - movex) / float(scaling[0])) * scaling[0] - width)
x = movex
if centered:
width -= 2 * movex
@@ -537,7 +537,7 @@
width -= movex
elif handle[0] == 3:
if scaling is not None:
- movex = round(float(self.Pos.x + width + movex) / float(scaling[0])) * scaling[0] - self.Pos.x - width
+ movex = round(float(width + movex) / float(scaling[0])) * scaling[0] - width
if centered:
x = -movex
width += 2 * movex
@@ -546,7 +546,7 @@
if handle[1] == 1:
movey = max(-self.BoundingBox.y, movey)
if scaling is not None:
- movey = round(float(self.Pos.y + movey) / float(scaling[1])) * scaling[1] - self.Pos.y
+ movey = -(round(float(height - movey) / float(scaling[1])) * scaling[1] - height)
y = movey
if centered:
height -= 2 * movey
@@ -554,7 +554,7 @@
height -= movey
elif handle[1] == 3:
if scaling is not None:
- movey = round(float(self.Pos.y + height + movey) / float(scaling[1])) * scaling[1] - self.Pos.y - height
+ movey = round(float(height + movey) / float(scaling[1])) * scaling[1] - height
if centered:
y = -movey
height += 2 * movey