function calculateLineAngleOfOutsideCanvas(type, shapePointNavigation, linePointsOfOneVertexIndex) {
  const { startPointIndex, endPointIndex1, endPointIndex2 } = linePointsOfOneVertexIndex;
  const horizontalVerticalAngle = type === 'x' ? 180 : 270;

  return [endPointIndex1, endPointIndex2].map((pointIndex) => {
    const startPoint = shapePointNavigation[startPointIndex];
    const endPoint = shapePointNavigation[pointIndex];
    const diffY = startPoint.y - endPoint.y;
    const diffX = startPoint.x - endPoint.x;

    return (Math.atan2(diffY, diffX) * 180) / Math.PI - horizontalVerticalAngle;
  });
}
Calculate a point line outside the canvas.
@param {string} type - 'x' or 'y'
@param {Array} shapePointNavigation - shape edge positions
  @param {object} shapePointNavigation.lefttop - left top position
  @param {object} shapePointNavigation.righttop - right top position
  @param {object} shapePointNavigation.leftbottom - lefttop position
  @param {object} shapePointNavigation.rightbottom - rightbottom position
@param {Object} linePointsOfOneVertexIndex - Line point of one vertex
  @param {Object} linePointsOfOneVertexIndex.startPoint - start point index
  @param {Object} linePointsOfOneVertexIndex.endPointIndex1 - end point index
  @param {Object} linePointsOfOneVertexIndex.endPointIndex2 - end point index
@returns {Object}