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

Skip to content

Commit dcf8645

Browse files
committed
add OffsetBox.contains method
svn path=/trunk/matplotlib/; revision=7474
1 parent b953019 commit dcf8645

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

lib/matplotlib/offsetbox.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,13 @@ def set_figure(self, fig):
152152
for c in self.get_children():
153153
c.set_figure(fig)
154154

155+
def contains(self, mouseevent):
156+
for c in self.get_children():
157+
a, b = c.contains(mouseevent)
158+
if a:
159+
return a, b
160+
return False, {}
161+
155162
def set_offset(self, xy):
156163
"""
157164
Set the offset

0 commit comments

Comments
 (0)