Closed 240026763 closed 1 year ago
Please try:
<PortRenderer @key="port" Port="port"></PortRenderer>
I think this issue is the same as https://github.com/Blazor-Diagrams/Blazor.Diagrams/issues/220, Blazor just doesn't pick up the changes correctly since it's a for loop.
Indeed adding @key ="port"
fixes the rendering problem when locking the nodes.
The port renderer seems to be misaligning the ports when the node and ports are locked for version 3.0.0-beta2. This bug wasn't in v2.1.6. I discovered this when I have my application lock all the nodes and links. I have the port renderer not render the port if it is locked and doesn't have any links.
Code for a custom node widget
Expected Behavior (2.1.6): Branch showing this behavior: https://github.com/240026763/Blazor.Diagrams/tree/ShowOnlyPortsWithLinks-2.1.6
Bugged Behavior (3.0.0): Branch showing this behavior: https://github.com/240026763/Blazor.Diagrams/tree/ShowOnlyPortsWithLinks-3.0.0Beta2
The behavior only gets worse the more theCouldn't reproduce. Looks to persist the same issue each toggle.Node.Locked
is toggled.