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