Skip to content

Commit 9af9b5b

Browse files
committed
In DraggableLegend, inherit DraggableBase.artist_picker.
... which is implemented to return self.ref_artist.contains(evt), and DraggableLegend.ref_artist == self.legend, so all's good. Can be checked by manually dragging a draggable legend: ``` plot([1, 2], label="foo"); legend().set_draggable(True) ```
1 parent f4c25b2 commit 9af9b5b

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

lib/matplotlib/legend.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@ def __init__(self, legend, use_blit=False, update="loc"):
7070
DraggableOffsetBox.__init__(self, legend, legend._legend_box,
7171
use_blit=use_blit)
7272

73-
def artist_picker(self, legend, evt):
74-
return self.legend.contains(evt)
75-
7673
def finalize_offset(self):
7774
update_method = cbook._check_getitem(
7875
{"loc": self._update_loc, "bbox": self._bbox_to_anchor},

0 commit comments

Comments
 (0)