diff options
author | Tomeu Vizoso <tomeu@sugarlabs.org> | 2009-01-30 16:44:15 (GMT) |
---|---|---|
committer | Tomeu Vizoso <tomeu@sugarlabs.org> | 2009-01-30 16:44:15 (GMT) |
commit | 9841c37d1cd57f1c31812931c2a4361f86a324b8 (patch) | |
tree | 0c5e2fd76c80895e8953443c355b312a4c2b8e6f /thoughtview.py | |
parent | 7b58cdb6300d54357afecf2316c174f6d2559309 (diff) |
Better position connections and only update the model once the item has been dropped
Diffstat (limited to 'thoughtview.py')
-rw-r--r-- | thoughtview.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/thoughtview.py b/thoughtview.py index a079476..eeae9e8 100644 --- a/thoughtview.py +++ b/thoughtview.py @@ -25,6 +25,7 @@ from sugar.graphics import style from gaphas.examples import Box, Text from gaphas.connector import Handle +from gaphas.geometry import Rectangle class ThoughtView(Box): @@ -105,3 +106,7 @@ class ThoughtView(Box): self.new_thought_handle.y = 20 return updated + def get_rectangle(self): + x, y = self.get_position() + return Rectangle(x, y, self.width, self.height) + |