The group and node are not aligned within gridlayout

If the member parts of grid layout have both group and node, they seem not align to the grid. Are the align positions of group and node different? Or is there any idea to make them align at the right position?


Each Group has its own Group.layout, unless you explicitly set Group.layout to null.

If all Groups have a null Group.layout, it will cause the Diagram.layout to position all non-Group Nodes, including the member nodes of groups, as if they were top-level nodes.

Or am I misunderstanding your question?

Walter, thanks a lot for your reply. I got the reason. It is because the grid layout miss the setting of alignment. Currently after setting the alignment to go.GridLayout.Position, it works.