example/js/svg.js
function(box) {
      var b = new c()

      // merge boxes
      b.x      = Math.min(this.x, box.x)
      b.y      = Math.min(this.y, box.y)
      b.width  = Math.max(this.x + this.width,  box.x + box.width)  - b.x
      b.height = Math.max(this.y + this.height, box.y + box.height) - b.y

      return fullBox(b)
    }
function(box) {
      var b = new c()

      // merge boxes
      b.x      = Math.min(this.x, box.x)
      b.y      = Math.min(this.y, box.y)
      b.width  = Math.max(this.x + this.width,  box.x + box.width)  - b.x
      b.height = Math.max(this.y + this.height, box.y + box.height) - b.y

      return fullBox(b)
    }
function ( box ) { var b = new c ( ) // merge boxes b . x = Math . min ( this . x , box . x ) b . y = Math . min ( this . y , box . y ) b . width = Math . max ( this . x + this . width , box . x + box . width ) - b . x b . height = Math . max ( this . y + this . height , box . y + box . height ) - b . y return fullBox ( b ) }
Merge rect box with another, return a new instance
Merge rect box with another return a new instance