microsoft / automatic-graph-layout

A set of tools for graph layout and viewing
Other
1.36k stars 308 forks source link

Graph appears twice while zooming out using AutomaticGraphLayoutControl (WPF) #286

Closed fxsth closed 3 years ago

fxsth commented 3 years ago

I just started working with WPF and MSAGL, so please forgive me if thats an obvious beginners fault, but I couldn't find a related issue: When using the AutomaticGraphLayoutControl from the latest nuget-package (WpfGraphControl 1.1.11) in my MainWindow.xaml, I can zoom out and in the background appears the same graph as in the initial view. The background graph disappears when resizing the window manually. The problem occurs not only in my project, I can replicate it in the "MinWpfCoreApp"-sample by replacing the old package WpfCoreGraphControl with AutomaticGraphLayout.WpfGraphControl, see screenshot:

image

Creating a GraphViewer instead and using it via BindToPanel() seems to be a workaround.

levnach commented 3 years ago

I think I fixed it with the last commit https://github.com/microsoft/automatic-graph-layout/commit/2e18785853235b859383ba38f64220bd6cf9642c. I have not published a new nuget though.

fxsth commented 3 years ago

Yes, it fixed it. Thank you, Lev! Is the nuget package still maintained by @paulovila ?

paulovila commented 3 years ago

Hi Lev let me know if you are ok to publish it

levnach commented 3 years ago

Hi Paulo, please do!

paulovila commented 3 years ago

Will do tomorrow, sorry, I'm travelling