File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -628,6 +628,13 @@ def contains(self, mouseevent):
628
628
"""
629
629
if self ._contains is not None :
630
630
return self ._contains (self , mouseevent )
631
+ # 1) This doesn't work for figimage; but figimage also needs a fix
632
+ # below (as the check cannot use x/ydata and extents).
633
+ # 2) As long as the check below uses x/ydata, we need to test axes
634
+ # identity instead of `self.axes.contains(event)` because even if
635
+ # axes overlap, x/ydata is only valid for event.inaxes anyways.
636
+ if self .axes is not mouseevent .inaxes :
637
+ return False , {}
631
638
# TODO: make sure this is consistent with patch and patch
632
639
# collection on nonlinear transformed coordinates.
633
640
# TODO: consider returning image coordinates (shouldn't
You can’t perform that action at this time.
0 commit comments