Positioning comment nodes in Custom layout

Hi, we are using a Custom tree layout (Parallel layout).
In our layout we want to add comments to our nodes.

When i added comment nodes (followed comments sample approach), some comment nodes are drawn above existing nodes and causing some overlaps with the nodes and comments.

Is there any way, so the comment nodes will be adjusted in near by empty area.
or around the diagram.

Do you have a screenshot to show what you are encountering?

The first one is what we are getting,
and we are expecting the below diagram or nearest to it.

For each comment node, is your comment node member of the same group that the commented node is?

Yeah, Now i added the group info. and its drawing near to the nodes, and there is no overlaps with other comment nodes.
But in 90 degree angle, it little overlaps with its parent node. and some places it overlaps with links.

To make it exactly as ExpectedDiagram, (As we want to customize their position)
I have overridden layoutComments and tried to set the position just below the node using node’s position. But that point of time the node is giving its position values with respect to its parent group.
As this solution didnt worked out, I tried to position the commentNodes after the diagram drawing completed. this time I got the position values of node and i’m able to position the commentNodes.

Though its working, it requires another call and need to maintain all the commentNode keys.

  1. Is there any way to get the exact position values of node, so that in layoutComments method i can position commentNode.
    2) From the source i come know that, after committing nodes only it calls layoutComments . but why node’s position values are different from actual.
    3) If there’s any better way of customization please suggest.


    thanks.

I think your TreeLayout.layoutComments override ought to be setting the TreeVertex.location property on the TreeVertex for the comment node, not on the comment Node itself.