Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/draggableobject.py
diff options
context:
space:
mode:
authorpmoxhay <pmoxhay@earthlink.net>2009-02-11 01:15:02 (GMT)
committer pmoxhay <pmoxhay@earthlink.net>2009-02-11 01:15:02 (GMT)
commitc7a85dd8b37262624852fb61cab8cb7e672764a5 (patch)
treeb4f3a273ce468bb83a3d7fa94e4fad5374a19dca /draggableobject.py
parentf1ef525a057dd1224366aa11e511086cbfce9b40 (diff)
Add problems in comparing lengths.
Diffstat (limited to 'draggableobject.py')
-rw-r--r--draggableobject.py25
1 files changed, 17 insertions, 8 deletions
diff --git a/draggableobject.py b/draggableobject.py
index c60a307..4010789 100644
--- a/draggableobject.py
+++ b/draggableobject.py
@@ -20,14 +20,14 @@ from vector import Vector
import gtk, math
# The global grid unit size, in pixels. Objects will snap to multiples of this value.
-GRID_SIZE = 50
-
-# Width and height of region within which we can drag objects.
-DRAGGING_RECT_WIDTH = 24*GRID_SIZE
-DRAGGING_RECT_HEIGHT = 16*GRID_SIZE
-
-# The global grid angle size, in radians.
-RADIAL_GRID_SIZE = math.pi/4
+#GRID_SIZE = 50
+#
+## Width and height of region within which we can drag objects.
+#DRAGGING_RECT_WIDTH = 24*GRID_SIZE
+#DRAGGING_RECT_HEIGHT = 16*GRID_SIZE
+#
+## The global grid angle size, in radians.
+#RADIAL_GRID_SIZE = math.pi/4
class DraggableObject(Object):
"""
@@ -52,6 +52,11 @@ class DraggableObject(Object):
#self.drag_copy = False
self.moving_by_key_press = False
+ #self.GRID_SIZE = 50
+ #self.DRAGGING_RECT_WIDTH = 24*GRID_SIZE
+ #self.DRAGGING_RECT_HEIGHT = 16*GRID_SIZE
+ #self.RADIAL_GRID_SIZE = math.pi/4
+
def get_bounds(self):
pass
@@ -139,6 +144,10 @@ class DraggableObject(Object):
return True
def on_key(self, event):
+ GRID_SIZE = 50
+ if self.container:
+ GRID_SIZE = self.container.GRID_SIZE
+
if not self.selectable or not self.draggable:
return