Tree mapper issue in initial layout

i m musing tree layout as my base diagram the problem is when i first load the diagram it looks like this

when i scroll around the second tree the nodes of tree move around with the container

finally i make a link it goes to its normal location inside the container

Perhaps you have some code that moves that “Lineage Test Physical” group to be at a particular location after the diagram has been loaded?

When the user scrolls, one of the groups moves relative to the other nodes in the diagram? That’s odd. It seems that you have a “ViewportBoundsChanged” DiagramEvent listener that is not doing what you want it to do.

even if the code moves the “Lineage Test Physical” isnt the inner tree suppose to be inside it, not a mile away?

this is what i m using as group template

and as for diagram

To answer your question: each Part is independent of others. So you can change the location of a Group without changing the location of its member nodes. And vice-versa. That is what it appears has happened – something set the location of the “Logical Modelll” group without setting the locations of its member nodes. Or vice-versa.

If you want to move a group including its members, call the Part.move or Part.moveTo method. All Layouts should call move or moveTo, for example, just in case the Nodes that they are laying out happen to be Groups.

I cannot tell what your app is doing, but I would guess that the Binding on the Group.position is being given inconsistent point data from the positions of its member Nodes. Look at your model data carefully.