function adjustOriginByStartPoint(pointer, shape) {
  const centerPoint = shape.getPointByOrigin('center', 'center');
  const angle = -shape.angle;
  const originPositions = getPositionsOfRotatedOrigin(centerPoint, pointer, angle);
  const { originX, originY } = originPositions;
  const origin = shape.getPointByOrigin(originX, originY);
  const left = shape.left - (centerPoint.x - origin.x);
  const top = shape.top - (centerPoint.y - origin.y);

  shape.set({
    originX,
    originY,
    left,
    top,
  });

  shape.setCoords();
}
Adjust the origin of shape by the start point
@param {{x: number, y: number}} pointer - Pointer value
@param {fabric.Object} shape - Shape object
@ignore