Blazor.Diagrams icon indicating copy to clipboard operation
Blazor.Diagrams copied to clipboard

NavigatorWidget not work with empty Diagram

Open xhydongda opened this issue 4 years ago • 3 comments

with example's razor file contains NavigatorWidget:

and *Component.cs file OnInitialized() does not Add Nodes or Links to diagram,

then, I got "Unhandled exception rendering component: Object reference not set to an instance of an object."

xhydongda avatar May 20 '21 07:05 xhydongda

Hello, I will try to fix this in the upcoming version. Thanks for letting me know!

zHaytam avatar May 21 '21 10:05 zHaytam

I found a few other bugs in the Navigator, and I think the whole component needs to be re-done.

zHaytam avatar May 25 '21 11:05 zHaytam

The issue is that https://github.com/Blazor-Diagrams/Blazor.Diagrams/blob/9fa396040755ef97874ac3f16ceedddcdc94dbd3/src/Blazor.Diagrams/Components/NavigatorWidget.razor.cs#L19 is not initialised. You could just append = Point.Zero and it will work.

rob-ack avatar May 19 '22 15:05 rob-ack