function calculateDistanceOverflowPart({ type, shapeObj, outDistance, left, top, flipX, flipY }) {
  const shapePointNavigation = getShapeEdgePoint(shapeObj);
  const shapeNeighborPointNavigation = [
    [1, 2],
    [0, 3],
    [0, 3],
    [1, 2],
  ];
  const linePointsOutsideCanvas = calculateLinePointsOutsideCanvas(
    type,
    shapePointNavigation,
    shapeNeighborPointNavigation
  );
  const reatAngles = calculateLineAngleOfOutsideCanvas(
    type,
    shapePointNavigation,
    linePointsOutsideCanvas
  );
  const { startPointIndex } = linePointsOutsideCanvas;
  const diffPosition = getReversePositionForFlip({
    outDistance,
    startPointIndex,
    flipX,
    flipY,
    reatAngles,
  });

  return [left + diffPosition.left, top + diffPosition.top];
}
Calculate fill image position for out of Canvas
@param {string} type - 'x' or 'y'
@param {fabric.Object} shapeObj - shape object
@param {number} outDistance - distance away
@param {number} left - original left position
@param {number} top - original top position
@returns {Array}