demos/Collage/fabric.js
function (object, e) {
      if (this._activeObject) {
        this._activeObject.setActive(false);
      }
      this._activeObject = object;
      object.setActive(true);

      this.renderAll();

      this.fire('object:selected', { target: object, e: e });
      object.fire('selected', { e: e });
      return this;
    }
function (object, e) {
      if (this._activeObject) {
        this._activeObject.setActive(false);
      }
      this._activeObject = object;
      object.setActive(true);

      this.renderAll();

      this.fire('object:selected', { target: object, e: e });
      object.fire('selected', { e: e });
      return this;
    }
function ( object , e ) { if ( this . _activeObject ) { this . _activeObject . setActive ( false ) ; } this . _activeObject = object ; object . setActive ( true ) ; this . renderAll ( ) ; this . fire ( 'object:selected' , { target : object , e : e } ) ; object . fire ( 'selected' , { e : e } ) ; return this ; }
Sets given object as active
@method setActiveObject
@param object {fabric.Object} Object to set as an active one
@return {fabric.Canvas} thisArg
@chainable
Sets given object as active