Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/movableobject.py
diff options
context:
space:
mode:
authorpmoxhay <pmoxhay@earthlink.net>2009-02-16 19:03:56 (GMT)
committer pmoxhay <pmoxhay@earthlink.net>2009-02-16 19:03:56 (GMT)
commitc2ccda8e7fd359ad9829cd2b88ef0b347281a037 (patch)
tree9567af8043aa9a2dadcd99a7bc07e2fc6979dc7b /movableobject.py
parentc0cd8b1c686e46839a33b8d7523b9b2bbef98487 (diff)
First try at comparing in amount of discrete objects.
Objects sometimes extend beyond AnswerBox.
Diffstat (limited to 'movableobject.py')
-rw-r--r--movableobject.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/movableobject.py b/movableobject.py
index e28b28c..40fc9b7 100644
--- a/movableobject.py
+++ b/movableobject.py
@@ -101,12 +101,17 @@ class MovableObject(Object):
return boolean
- def on_mouse(self, event):
+ def on_mouse(self, event):
+ #print "MovableObject: on_mouse called)"
if not self.selectable:
+ #print "MovableObject: on_mouse returning because not selectable: ", self
return
- epos = Vector(event.x, event.y)
+ #print "MovableObject: on_mouse continuing...:", self
+ epos = Vector(event.x, event.y)
+
+ #print "Movable Object: self.drag_type =", self.drag_type
# Process in progress dragging, if active.
if self.drag_type:
if self.drag_type == 'rotate':
@@ -117,6 +122,7 @@ class MovableObject(Object):
if self.container:
self.container.queue_cursor(cursor_type)
+ #print "Movable Object: event.type =", event.type
if event.type == gtk.gdk.MOTION_NOTIFY:
if self.container and self.container.drag_object:
@@ -126,6 +132,7 @@ class MovableObject(Object):
self.rotate(self.press_angle + math.atan2(epos.y - self.pos.y, epos.x - self.pos.x) - \
math.atan2(self.press_pos.y - self.pos.y, self.press_pos.x - self.pos.x) )
else:
+ #print "Movable Object: trying to move:", self
self.move(epos - self.drag_offset)
for o in self.drop_targets: