MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _hover

Method _hover

lib/matplotlib/widgets.py:2966–2979  ·  view source on GitHub ↗

Update the canvas cursor if it's over a handle.

(self, event)

Source from the content-addressed store, hash-verified

2964
2965 @_call_with_reparented_event
2966 def _hover(self, event):
2967 """Update the canvas cursor if it's over a handle."""
2968 if self.ignore(event):
2969 return
2970
2971 if self._active_handle is not None or not self._selection_completed:
2972 # Do nothing if button is pressed and a handle is active, which may
2973 # occur with drag_from_anywhere=True.
2974 # Do nothing if selection is not completed, which occurs when
2975 # a selector has been cleared
2976 return
2977
2978 _, e_dist = self._edge_handles.closest(event.x, event.y)
2979 self._set_span_cursor(enabled=e_dist <= self.grab_range)
2980
2981 def _onmove(self, event):
2982 """Motion notify event handler."""

Callers

nothing calls this directly

Calls 3

_set_span_cursorMethod · 0.95
ignoreMethod · 0.45
closestMethod · 0.45

Tested by

no test coverage detected