|
From: <ry...@us...> - 2008-11-05 17:12:09
|
Revision: 6367
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6367&view=rev
Author: ryanmay
Date: 2008-11-05 17:12:03 +0000 (Wed, 05 Nov 2008)
Log Message:
-----------
Revert the DraggableRectangle exercise solution to use the Rectangle.xy attribute now that it exists. This agrees with the exercise description.
Modified Paths:
--------------
trunk/matplotlib/doc/users/event_handling.rst
Modified: trunk/matplotlib/doc/users/event_handling.rst
===================================================================
--- trunk/matplotlib/doc/users/event_handling.rst 2008-11-05 17:09:55 UTC (rev 6366)
+++ trunk/matplotlib/doc/users/event_handling.rst 2008-11-05 17:12:03 UTC (rev 6367)
@@ -182,8 +182,8 @@
contains, attrd = self.rect.contains(event)
if not contains: return
- x0, y0 = self.rect.get_x(), self.rect.get_y()
- print 'event contains', x0, y0
+ print 'event contains', self.rect.xy
+ x0, y0 = self.rect.xy
self.press = x0, y0, event.xdata, event.ydata
def on_motion(self, event):
@@ -257,8 +257,8 @@
if DraggableRectangle.lock is not None: return
contains, attrd = self.rect.contains(event)
if not contains: return
- x0, y0 = self.rect.get_x(), self.rect.get_y()
- print 'event contains', x0, y0
+ print 'event contains', self.rect.xy
+ x0, y0 = self.rect.xy
self.press = x0, y0, event.xdata, event.ydata
DraggableRectangle.lock = self
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|