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

Method ignore

lib/matplotlib/widgets.py:2409–2433  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

2407 self.connect_event('scroll_event', self.on_scroll)
2408
2409 def ignore(self, event):
2410 # docstring inherited
2411 if super().ignore(event):
2412 return True
2413 if not self.ax.get_visible():
2414 return True
2415 # If canvas was locked
2416 if not self.canvas.widgetlock.available(self):
2417 return True
2418 if not hasattr(event, 'button'):
2419 event.button = None
2420 # Only do rectangle selection if event was triggered
2421 # with a desired button
2422 if (self.validButtons is not None
2423 and event.button not in self.validButtons):
2424 return True
2425 # If no button was pressed yet ignore the event if it was out of the Axes.
2426 if self._eventpress is None:
2427 return not self.ax.contains(event)[0]
2428 # If a button was pressed, check if the release-button is the same.
2429 if event.button == self._eventpress.button:
2430 return False
2431 # If a button was pressed, check if the release-button is the same.
2432 return (not self.ax.contains(event)[0] or
2433 event.button != self._eventpress.button)
2434
2435 def update(self):
2436 """Draw using blit() or draw_idle(), depending on ``self.useblit``."""

Callers 4

pressMethod · 0.95
releaseMethod · 0.95
onmoveMethod · 0.95
on_scrollMethod · 0.95

Calls 4

availableMethod · 0.80
ignoreMethod · 0.45
get_visibleMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected