Skip to content

Commit 5d7ed06

Browse files
committed
contains() should return (bool, dict), not just bool. This was a regression introduced in the py3 branch.
1 parent 6638c4f commit 5d7ed06

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/text.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ def contains(self,mouseevent):
211211
r = l+w
212212
t = b+h
213213
x, y = mouseevent.x, mouseevent.y
214-
return x >= l and x <= r and y >= t and y <= b
214+
inside = (x >= l and x <= r and y >= t and y <= b)
215+
return inside, {}
215216

216217
def _get_xy_display(self):
217218
'get the (possibly unit converted) transformed x, y in display coords'

0 commit comments

Comments
 (0)