Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link Not Rendered Correctly #434

Open
HuaFuHum opened this issue Apr 20, 2024 · 0 comments
Open

Link Not Rendered Correctly #434

HuaFuHum opened this issue Apr 20, 2024 · 0 comments

Comments

@HuaFuHum
Copy link

Firstly, thank you for such a great package.

Recently, I want to use Blazor.Diagrams to compose an IT systems structure diagram of our organization. However, I noticed a weird case that when I have a group (the inner group) inside another group (the outer group), sometimes the links targeted on the inner group could not be rendered correctly. Please see below the gif that illustrates the problem : At the very first beginning, you could notice that the links around the upper left group are totally a mess and they returned to normal after a click of refresh button. Then I clicked on the refresh button several times and the links remain correct. However, after the last time I clicked on the refresh button, some links become incorrect again.

LinkIllustration

I think this phenomenon happens randomly and when I first noticed it I found that if I move the nodes in the inner group a little bit the problematic links would have a chance to be re-rendered into the correct position. So I add a method when overriding the OnAfterRendered method to do so, that's the reason why in the GIF you might note that some of the nodes might shake and some of the links would change position after the diagram is rendered and ZoomToFit.

I want to reproduce the problem with a simpler test project but seems to fail. In the test project, I made an inner group and outer group settings to mock my scenario. However, maybe the test project is not complicated enough or for other reasons, the problem seems not being reproduced. Please see the Clips, GIF and test project address below:

TestProject

In the above test project GIF, I notice that:

  1. When clicking the refresh button, at the very first beginning, there is a port rendered at the top left of the diagram instantly and then disappeared. It seems to me that some ports would be rendered firstly at a specific position and then move to their should-be position. So is it possible that the reason for the weird phenomenon above results from that those abnormal ports fails to move to their correct positions after first rendering?

  2. The ports of the inner group seems to be rendered correctly this time but actually not quite so. My code to setup the diagram is as follows:

TestProject

The PortAlignments I set are Bottom and Right but in the GIF I found that it is rendered as Bottom and Top. Not sure why.

  1. The test project address : https://github.com/HuaFuHum/BlazorDiagramIllustration.git

I am not a professional programmer so my understanding may be very wrong -.-!! Thanks again for your great package and hard work. Please let me know if you need any follow-up information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant