Adding support for preventing expending graphical element to have a negative position
--- a/graphics/GraphicCommons.py Fri Mar 20 16:36:13 2009 +0100
+++ b/graphics/GraphicCommons.py Mon Mar 23 16:42:02 2009 +0100
@@ -617,6 +617,7 @@
if scaling is not None:
movex = round_scaling(width + movex, scaling[0]) - width
if event.ShiftDown():
+ movex = min(self.BoundingBox.x, movex)
x = -movex
width += 2 * movex
else:
@@ -634,6 +635,7 @@
if scaling is not None:
movey = round_scaling(height + movey, scaling[1]) - height
if event.ShiftDown():
+ movey = min(self.BoundingBox.y, movey)
y = -movey
height += 2 * movey
else: