code: function _getBoundingRect (rects) {
    var bounds = {
      left: Number.POSITIVE_INFINITY,
      top: Number.POSITIVE_INFINITY,
      right: Number.NEGATIVE_INFINITY,
      bottom: Number.NEGATIVE_INFINITY,
      width: Number.NaN,
      height: Number.NaN
    }
  
    forEach(rects, function (rect) {
      if (rect.left < bounds.left) {
        bounds.left = rect.left
      }
      if (rect.top < bounds.top) {
        bounds.top = rect.top
      }
      if (rect.left + rect.width > bounds.right) {
        bounds.right = rect.left + rect.width
      }
      if (rect.top + rect.height > bounds.bottom) {
        bounds.bottom = rect.top + rect.height
      }
    })
    bounds.width = bounds.right - bounds.left
    bounds.height = bounds.bottom - bounds.top
    return bounds
  }
docs: /*
  Calculate a bounding rectangle for a set of rectangles.
  
  Note: Here, `bounds.right` and `bounds.bottom` are relative to
  the left top of the viewport.
  
  @param {object[]}