How to change position and order Nodes for Assistants

Well, Walter, if I replace SideTreeLayout with your new version that sorts nodes, default behavior of OrgChart Assistant sample has been changed like has been shown on this picture. Could you please fix SideTreeLayout so it puts first assistant on right side of the link like it was in original sample https://gojs.net/latest/samples/orgChartAssistants.html

Thank you.

The ability to sort the nodes also gives you the ability to decide the position of dummy nodes in the list of assistants. You might need to insert a dummy node in order to make sure the real node is in the second position.

Could you write a sample?
I can’t understand where exactly I should add dummy node.

Note that the code that I gave in the solution above creates a dummy vertex so that there always an even number of assistant vertexes excluding the final dummy vertex used as the parent for the regular children vertexes. So that means the number of immediate child vertexes for the parent vertex is always odd.

It’s just a matter of how you sort those dummy vertexes relative to the regular assistant vertexes. That is all done in the sortTreeVertexChildren method. You just have to make sure that the dummy vertex used as the pretend parent of the real non-assistant nodes/vertexes is always last.

@walter Great thanks! I got what I want. Thank you for the explanation.

I put my solution here, maybe someone will be needed to it.