code: function (x, y, by) {
        var t = this._currentTransform,
            offset = this._offset,
            target = t.target;
  
        if (target.lockScalingX && target.lockScalingY) return;
  
        var lastLen = sqrt(pow(t.ey - t.top - offset.top, 2) + pow(t.ex - t.left - offset.left, 2)),
            curLen = sqrt(pow(y - t.top - offset.top, 2) + pow(x - t.left - offset.left, 2));
  
        target._scaling = true;
  
        if (!by) {
          target.lockScalingX || target.set('scaleX', t.scaleX * curLen/lastLen);
          target.lockScalingY || target.set('scaleY', t.scaleY * curLen/lastLen);
        }
        else if (by === 'x' && !target.lockUniScaling) {
          target.lockScalingX || target.set('scaleX', t.scaleX * curLen/lastLen);
        }
        else if (by === 'y' && !target.lockUniScaling) {
          target.lockScalingY || target.set('scaleY', t.scaleY * curLen/lastLen);
        }
      }
docs: Scales object by invoking its scaleX/scaleY methods
  @method _scaleObject
  @param x {Number} pointer's x coordinate
  @param y {Number} pointer's y coordinate
  @param by {String} Either 'x' or 'y' - specifies dimension constraint by which to scale an object.
  When not provided, an object is scaled by both dimensions equally