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

Method drag_pan

lib/matplotlib/backend_bases.py:3213–3224  ·  view source on GitHub ↗

Callback for dragging in pan/zoom mode.

(self, event)

Source from the content-addressed store, hash-verified

3211 button=event.button, axes=axes, cid=id_drag)
3212
3213 def drag_pan(self, event):
3214 """Callback for dragging in pan/zoom mode."""
3215 if event.buttons != {self._pan_info.button}:
3216 # Zoom ended while canvas not in focus (it did not receive a
3217 # button_release_event); cancel it.
3218 self.release_pan(None) # release_pan doesn't actually use event.
3219 return
3220 for ax in self._pan_info.axes:
3221 # Using the recorded button at the press is safer than the current
3222 # button, as multiple buttons can get pressed during motion.
3223 ax.drag_pan(self._pan_info.button, event.key, event.x, event.y)
3224 self.canvas.draw_idle()
3225
3226 def release_pan(self, event):
3227 """Callback for mouse button release in pan/zoom mode."""

Callers 2

test_interactive_panFunction · 0.95

Calls 2

release_panMethod · 0.95
draw_idleMethod · 0.45

Tested by 2

test_interactive_panFunction · 0.76