demos/Collage/fabric.js
function (callback) {
    var data = JSON.stringify(this);
    this.cloneWithoutData(function(clone) {
      clone.loadFromJSON(data, function() {
        callback && callback(clone);
      });
    });
  }
function (callback) {
    var data = JSON.stringify(this);
    this.cloneWithoutData(function(clone) {
      clone.loadFromJSON(data, function() {
        callback && callback(clone);
      });
    });
  }
function ( callback ) { var data = JSON . stringify ( this ) ; this . cloneWithoutData ( function ( clone ) { clone . loadFromJSON ( data , function ( ) { callback && callback ( clone ) ; } ) ; } ) ; }
Clones canvas instance
@method clone
@param {Object} [callback] Receives cloned instance as a first argument
Clones canvas instance