Overview not matching diagram

Hi,



I have some problems using the Overview.



My diagram makes use of a custom Layout that specifies locations for the Spot for every link. This works fine in the diagram, but the Spot location do not always match in the Overview. The achieved goal is that links between two Nodes will always be vertical. Moving a Node will also move the link. Specifically, the Link.Route.ToSpot and Link.Route.FromSpot are recalculated for all links.



Do I need to explicitely assign the same Layout to the Overview? I did not think so, because the initial layout is always correct.



I’ve made sure the Overview.Observed is only done in the Diagram.InitialLayoutCompleted event.



Is the “manual” assignation of Spots forbidden?



The weird part is that it sometimes work.



I’ll try to have a sample tomorrow, to make it clearer.



B.

That’s right – by default Overview uses its own private layout that just gets the positions of nodes from the observed diagram.

Setting Route.ToSpot and FromSpot on each Link is fine.

(forgot to tell, I’m using goWpf 1.0.1.3)



After more investigation, the problem really has to do with the Node resizing. In my case, I only ever resize the ToNode, so this is where I’m currently looking.



My Node template looks like this:

<br /><go:SpotPanel go:Node.SelectionElementName="Shape" go:Node.Resizable="True"> <br /> <go:NodeShape x:Name="Shape" go:NodePanel.Figure="Rectangle" Stretch="Fill" Width="{Binding Path=Data.Width, Mode=TwoWay}" go:SpotPanel.Main="True" go:Node.PortId="" /> <br /> <TextBlock Text="text1" HorizontalAlignment="Right" go:SpotPanel.Spot="1.0 0.0" go:SpotPanel.Alignment="1.0 1.0"/> <br /> <TextBlock Height="10" Width="{Binding Path=Data.Width, Mode=OneWay}"/> <br /></go:SpotPanel> <br />



The code where the width is adjusted:

<br />link.ToNode.Port.Width += xMissingWidth; <br />



The way it behaves is as if the Spot.X value used in the Overview was the right value, but applied to the previous Width value of the Node.



It may make more sense if using the whole example project. Any location I could send this?



B.

I know there have been some bug fixes relating to Overview. I don’t know if your case is covered by any of the currently available baselevels.

Could you at least try the latest baselevel of 1.0? GoXam Releases

But you might want to try 1.1.

Or even 1.2 beta, if you have a subscription.

Hi,



I tried it with latest versions:



- with 1.0.8.3, same behavior;

- with 1.1.8.3, and the Overview works fine;



So it looks like it was fixed somewhere in 1.1.

I’ll see if I can use this version.



As a sidenote, there was another change of behavior in the 1.1.8.3. For some reason, the DoLayout() of the overridden DiagramLayout class was not called for InitialLayout.



Thanks.



B.

Yes, 1.1 included the following change:

I think you can get the original behavior by setting LayoutManager.Initial=“InvalidateAll”.