8000 Make table.py use BBox.union over bbox_all by dmcdougall · Pull Request #1409 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Make table.py use BBox.union over bbox_all #1409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 17, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions lib/matplotlib/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,7 @@ def contains(self, mouseevent):
boxes = [self._cells[pos].get_window_extent(self._cachedRenderer)
for pos in self._cells.iterkeys()
if pos[0] >= 0 and pos[1] >= 0]
# FIXME bbox_all is not defined.
bbox = bbox_all(boxes)
bbox = Bbox.union(boxes)
return bbox.contains(mouseevent.x, mouseevent.y), {}
else:
return False, {}
Expand All @@ -281,8 +280,7 @@ def get_children(self):
def get_window_extent(self, renderer):
'Return the bounding box of the table in window coords'
boxes = [c.get_window_extent(renderer) for c in self._cells]
# FIXME bbox_all is not defined
return bbox_all(boxes)
return Bbox.union(boxes)

def _do_cell_alignment(self):
""" Calculate row heights and column widths.
Expand Down
0