Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d687aaa

Browse files
committed
Fix 'extra credit' DraggableRectangle to no longer use Rectangle.xy. (Thanks to Neil Crighton for finding the original problem.)
svn path=/trunk/matplotlib/; revision=6352
1 parent 146441b commit d687aaa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

doc/users/event_handling.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,8 @@ Extra credit solution::
257257
if DraggableRectangle.lock is not None: return
258258
contains, attrd = self.rect.contains(event)
259259
if not contains: return
260-
print 'event contains', self.rect.xy
261-
x0, y0 = self.rect.xy
260+
x0, y0 = self.rect.get_x(), self.rect.get_y()
261+
print 'event contains', x0, y0
262262
self.press = x0, y0, event.xdata, event.ydata
263263
DraggableRectangle.lock = self
264264

0 commit comments

Comments
 (0)