I have been trying to create a new Layout class, derived from DiagramLayout . The only override I have it for the DoLayout() method. I’m calling the base.DoLayout() first.
My problem is that it only seems to be effective on loaded diagrams (ie, from a model.Load()), not when adding Nodes. I’m using the “InitialOnly” Condition. Nodes and Links creation is done through a button event, and I do use Start/Commit, after which I call LayoutDiagram() (because it’s the only other time I want to do the layout).
What really puzzles me is that the DoLayout() method is called, it seems to be properly modifying Locations, but these modifications to the nodes and links locations are not displayed on-screen. If I save the resulting diagram, locations will be “0 0”. In fact, if I do check these locations in the LayoutCompleted event, Locations are indeed “0 0”.
It looks as if some method overrides/reverts modifications I’ve just done.
What am I missing?