Skip to content

Right and Bottom aligned ports are incorrectly detected as inside the node #542

@Koubi01

Description

@Koubi01

Hi,

I'm having issues with port alignment and link routing when using orthogonal router. When I add ports using PortAlignment.Right or PortAlignment.Bottom, they appear visually in the correct place (outside the node), but links created from these ports behave incorrectly — it's as if the router still considers them inside the node.

I'm rendering nodes as svg. I have my custom model which inherits SvgNodeModel. The left and top ports are working perfectly.

this is how i render them

@foreach (var (port, i) in rightPorts.Select((p, i) => (p, i)))
    {
        double spacing = 50/3.0;
        var y = (i+1) * spacing * ((double)RectHeight / 100);
        var x = NodeWidth + 5;
        <PortRenderer @key="@($"{i} r")" Port="port">
            <circle cx="@x" cy="@y" r="5" fill="black" />
        </PortRenderer>
    }

I'm rendering every group the same.

When I was debuging the code, I notice that the right and bottom ports are considered inside the node by the Orthogonal Router.
I double check position of the ports and the size of node and it looks like correct,
These green links are rendered as only straith and withnout orhogonal routing.

Image

Am I doing something wrong or is that intended behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions