demos/Collage/fabric.js
function() {
      this.oCoords || this.setCoords();
      var xCoords = [this.oCoords.tl.x, this.oCoords.tr.x, this.oCoords.br.x, this.oCoords.bl.x];
      var minX = fabric.util.array.min(xCoords);
      var maxX = fabric.util.array.max(xCoords);
      return Math.abs(minX - maxX);
    }
function() {
      this.oCoords || this.setCoords();
      var xCoords = [this.oCoords.tl.x, this.oCoords.tr.x, this.oCoords.br.x, this.oCoords.bl.x];
      var minX = fabric.util.array.min(xCoords);
      var maxX = fabric.util.array.max(xCoords);
      return Math.abs(minX - maxX);
    }
function ( ) { this . oCoords || this . setCoords ( ) ; var xCoords = [ this . oCoords . tl . x , this . oCoords . tr . x , this . oCoords . br . x , this . oCoords . bl . x ] ; var minX = fabric . util . array . min ( xCoords ) ; var maxX = fabric . util . array . max ( xCoords ) ; return Math . abs ( minX - maxX ) ; }
Returns width of an object's bounding rectangle
@method getBoundingRectWidth
@return {Number} width value
Returns width of an object s bounding rectangle