Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0b41db6

Browse files
committed
Merge pull request matplotlib#1409 from dmcdougall/fix_bbox_all
Make table.py use BBox.union over bbox_all
2 parents 314e602 + 0027451 commit 0b41db6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/matplotlib/table.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,7 @@ def contains(self, mouseevent):
267267
boxes = [self._cells[pos].get_window_extent(self._cachedRenderer)
268268
for pos in self._cells.iterkeys()
269269
if pos[0] >= 0 and pos[1] >= 0]
270-
# FIXME bbox_all is not defined.
271-
bbox = bbox_all(boxes)
270+
bbox = Bbox.union(boxes)
272271
return bbox.contains(mouseevent.x, mouseevent.y), {}
273272
else:
274273
return False, {}
@@ -281,8 +280,7 @@ def get_children(self):
281280
def get_window_extent(self, renderer):
282281
'Return the bounding box of the table in window coords'
283282
boxes = [c.get_window_extent(renderer) for c in self._cells]
284-
# FIXME bbox_all is not defined
285-
return bbox_all(boxes)
283+
return Bbox.union(boxes)
286284

287285
def _do_cell_alignment(self):
288286
""" Calculate row heights and column widths.

0 commit comments

Comments
 (0)