function diagonal()

in src/app/components/queue-v2/queues-v2.component.ts [444:466]


function diagonal(s: any, d: any, orientation: string) {
  if (orientation == 'horizontal') {
    const sourceY = s.y + 300;  // Right side of the rectangle
    const sourceX = s.x + 60;   // Middle of the rectangle's height
    const targetY = d.y;        // Left side of the target rectangle
    const targetX = d.x + 60;   // Middle of the target rectangle's height

    return `M ${sourceY} ${sourceX} 
    H ${(sourceY + targetY) / 2} 
    V ${targetX} 
    H ${targetY}`;
  } else {
    const sourceX = s.x + 150;  // Middle of the rectangle's width
    const sourceY = s.y + 120;  // Bottom of the rectangle
    const targetX = d.x + 150;  // Middle of the rectangle's width
    const targetY = d.y;        // Top of the rectangle

    return `M ${sourceX} ${sourceY} 
        V ${(sourceY + targetY) / 2} 
        H ${targetX} 
        V ${targetY}`;
    }
}