Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

How to expand a tree by paths?

$
0
0

@gazo wrote:

Hello, I'm trying to open a tree according to a search. So, considering this hierarchy (this is just illustrative):
demo tree

Suppose the user performs a search, and the resultant nodes are: 2, 5 and 11. The idea is to hide other paths, this means, nodes: 4, 7 and 10.

I already tried to traverse the tree and:

for (var i = 0; i < nodes.length; i++) {
            nodes[i].isTreeExpanded = true;
            myDiagram.commandHandler.expandTree(nodes[i]);
}

But none of them work. Any idea? Thanks a lot!

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles