docs: function (e) {
  
        // accept only left clicks
        var isLeftClick  = 'which' in e ? e.which == 1 : e.button == 1;
        if (!isLeftClick && !fabric.isTouchSupported) return;
  
        if (this.isDrawingMode) {
          this._prepareForDrawing(e);
  
          // capture coordinates immediately; this allows to draw dots (when movement never occurs)
          this._captureDrawingPath(e);
          this.fire('mouse:down', { e: e });
          return;
        }
  
        // ignore if some object is being transformed at this moment
        if (this._currentTransform) return;
  
        var target = this.findTarget(e),
            pointer = this.getPointer(e),
            activeGroup = this.getActiveGroup(),
            corner;
  
        if (this._shouldClearSelection(e)) {
  
          this._groupSelector = {
            ex: pointer.x,
            ey: pointer.y,
            top: 0,
            left: 0
          };
  
          this.deactivateAllWithDispatch();
        }
        else {
          // determine if it's a drag or rotate case
          // rotate and scale will happen at the same time
          this.stateful && target.saveState();
  
          if (corner = target._findTargetCorner(e, this._offset)) {
            this.onBeforeScaleRotate(target);
          }
  
          this._setupCurrentTransform(e, target);
  
          var shouldHandleGroupLogic = e.shiftKey && (activeGroup || this.getActiveObject()) && this.selection;
          if (shouldHandleGroupLogic) {
            this._handleGroupLogic(e, target);
          }
          else {
            if (target !== this.getActiveGroup()) {
              this.deactivateAll();
            }
            this.setActiveObject(target, e);
          }
        }
        // we must renderAll so that active image is placed on the top canvas
        this.renderAll();
  
        this.fire('mouse:down', { target: target, e: e });
        target && target.fire('mousedown', { e: e });
      }