I am using Layered digraph layout. In this I am using Expand and Collapse using Custom Expand Collapse
functionalities.
I want to search the node based on label or any other node data. I have also implemented that using orgChartStatic Example.
What my need here is, that when the node was collapsed and the user was searching the collapsed node, I have to expand the node branch.
Are you using scrollToPart? CommandHandler | GoJS API
That will automatically expand trees and groups as needed.
That command is invoked by the space key, so if you have done something like that Org Chart static sample, the user can already cycle through all highlighted nodes by hitting the space bar repeatedly.
LayeredDigraphLayout works on any graph, not just on trees. With the custom expand/collapse functionality, the CommandHandler.scrollToPart command doesn’t know how to make a node visible, so you will have to do whatever is needed to make the node visible.
In that example, the command cannot decide which node to expand such that the desired node becomes visible.