Closed AlmightyLks closed 1 year ago
Oh and the reason why I suspect the source / target port setters is that it doesnt occur when not setting them:
Digging into this:
Hello, what version are you using?
Latest stable release, 2.1.6
Debugging the current master branch source to investigate
When Node#GetPort()
, shouldn't the returning Port's parent be the Node I used it on? ^^
Is there a possibility SourceNode
is null? Even though it seems impossible, since its being set in https://github.com/Blazor-Diagrams/Blazor.Diagrams/blob/master/src/Blazor.Diagrams.Core/Models/Base/BaseLinkModel.cs#L70
When
Node#GetPort()
, shouldn't the returning Port's parent be the Node I used it on? ^^
Interesting. Can you show me how are you creating these nodes and ports?
I think this is the only place where I create both, the node models and the ports
The type of SourcePort
is NodePort
?
This is very wierd... The only way Parent could be null is if you pass null to it. Cna you show me the NodePort class?
Oh, funny thing. I had this in my portmodel
Is a Port's Parent the node's parent or is a Port's Parent the node itself?
A port's parent is the node itself. A node doesn't have a parent (at least in the library, so that might be your own property?)
Would make sense, yeah 😄
One more question related to this feature It isn't showing any links at all now 😄
Am I using it right?
I'll need more information. Firstly, how are you rendering your ports?
Oh! I didn't know you had to add a PortRenderer to the custom node razor file! 😄 My bad
With this all my questions in this regards were answered. Thanks
For some reason the following code throws a NRE Am I doing something wrong?
Stacktrace:
Checking whether I am adding a null value to SetSource/TargetPort, shows me that they do have values: