demos/Collage/fabric.js
function(options) {
      if (this.constructor.fromObject) {
        return this.constructor.fromObject(this.toObject(), options);
      }
      return new fabric.Object(this.toObject());
    }
function(options) {
      if (this.constructor.fromObject) {
        return this.constructor.fromObject(this.toObject(), options);
      }
      return new fabric.Object(this.toObject());
    }
function ( options ) { if ( this . constructor . fromObject ) { return this . constructor . fromObject ( this . toObject ( ) , options ) ; } return new fabric . Object ( this . toObject ( ) ) ; }
Clones an instance
@method clone
@param {Object} options object
@return {fabric.Object} clone of an instance
Clones an instance