Blazor-Diagrams / Blazor.Diagrams

A fully customizable and extensible all-purpose diagrams library for Blazor
https://blazor-diagrams.zhaytam.com
MIT License
919 stars 176 forks source link

I can't render orthogonal #268

Closed elgransan closed 1 year ago

elgransan commented 1 year ago

Hi, I have another problem that I can't figure out. I want straight router and orthogonal path generator but

If I set it globally image

I get image

And if I do it link by link image

I get image

Any idea?

elgransan commented 1 year ago

Ok, I could understand that the problem is the Source Parent Size which is null, but I don't know why

image

zHaytam commented 1 year ago

Hello, In your node widget, are you using PortRenderer to actually render the ports? If their size is null that means they probably didn't render or they're not "visible" in the DOM, which means we can't really know their size and position.

elgransan commented 1 year ago

Yes, in fact, the links are displayed using "normal" router

image

I also forced a Size, and now I think is another problem

zHaytam commented 1 year ago

Would it be possible for you to host the project in GitHub so that I take a look at it? If it dosen't have anything confidential

elgransan commented 1 year ago

I will try to extract it from the whole project, thank! BTW the project is awesome

elgransan commented 1 year ago

Ok I published my code on https://github.com/elgransan/Blazor.DatabaseDesigner, It will be great if you can take it a look on it, when you can.

zHaytam commented 1 year ago

I have a feeling it's because the ports are not on the borders. I'm doing more tests to make sure

elgransan commented 1 year ago

Yes it was!!

image

zHaytam commented 1 year ago

Hum, that feels like a bad limitation. I'll see what I can do.

sajjadarashhh commented 10 months ago

i have same issue with this! @zHaytam

sajjadarashhh commented 10 months ago

image as you see here all links create by one method you can see below: Diagram.Links.Add(new LinkModel(this.GetPort(PortAlignment.Right), item.GetPort(PortAlignment.Left)) { Router = new OrthogonalRouter(), PathGenerator = new StraightPathGenerator(5) }); after size Changed event i re-set positions and then Create links children given Orthogonal Routing works fine but parents is not giving that works fine! i dont know why ! :\