lib/FrameUtils.js
function union (frame, otherFrame) {
  var x1 = Math.min(frame.x, otherFrame.x);
  var x2 = Math.max(frame.x + frame.width, otherFrame.x + otherFrame.width);
  var y1 = Math.min(frame.y, otherFrame.y);
  var y2 = Math.max(frame.y + frame.height, otherFrame.y + otherFrame.height);
  return make(x1, y1, x2 - x1, y2 - y1);
}
function union (frame, otherFrame) {
  var x1 = Math.min(frame.x, otherFrame.x);
  var x2 = Math.max(frame.x + frame.width, otherFrame.x + otherFrame.width);
  var y1 = Math.min(frame.y, otherFrame.y);
  var y2 = Math.max(frame.y + frame.height, otherFrame.y + otherFrame.height);
  return make(x1, y1, x2 - x1, y2 - y1);
}
function union ( frame , otherFrame ) { var x1 = Math . min ( frame . x , otherFrame . x ) ; var x2 = Math . max ( frame . x + frame . width , otherFrame . x + otherFrame . width ) ; var y1 = Math . min ( frame . y , otherFrame . y ) ; var y2 = Math . max ( frame . y + frame . height , otherFrame . y + otherFrame . height ) ; return make ( x1 , y1 , x2 - x1 , y2 - y1 ) ; }
Compute the union of two frames

@param {Frame} frame
@param {Frame} otherFrame
@return {Frame}
Compute the union of two frames