GoWPF 3.0.3 - GridSnapCellSize Alignment

Hello Walter, i wish i would have a more direct support line with you- - Anyway i have the following issue.

Recently i wondered how i could run into the following scenario:

As you can see, the “NT 0” node does not align with the GridSnapCellSize=“10 10” which i am using at the diagram.
For me it looks like i only ran into such a problem if a node has a Height or Width Size is like 30, 50, or 70 and so on. - The GridSnapCellSize then does align in the wrong way. If it is 20, 40, 60 and so on all is good.

Additional, i wonder, if i use the ClickCreatingTool, is there a way, that nodes are created to respected the GridSnapCellSize of the diagram? - Currently i ran into the issue, that i always need to manually realign the nodes.

Git: HannesHold/GoWPF: Some educational project to explore the GoWPF application (github.com)

Many thanks meanwhile, Hannes

You can send us email, if you prefer.

What is your node’s LocationSpot? If it is Spot.Center, then it shouldn’t be surprising that when the node has a width or height that is an odd number of cells, the sides cannot line up with the grid. Either don’t set the LocationSpot or make sure the grid’s lines spacing is half the Diagram.GridSnapCellSize.

I suppose you could override ClickCreatingTool.InsertNode to align the new Node the way that you want.

Thank you Walter. - Removing the LocationSpot, solved the alignment issue, which totally makes sense to me.

And yes, overriding InsertNode, provides me to easily adjust the coords: