Quantcast
Channel: Northwoods Software - Latest topics
Viewing all articles
Browse latest Browse all 7422

Tree Mapper tree Level Query

$
0
0

@no_one345 wrote:

i m working on a diagram using tree mapper as base of my diagram
https://gojs.net/latest/samples/treeMapper.html
i need to know is there a way to make the trees in both groups to be opened to level 2 by default i cant seem to achieve that
i tried this

    function defaulTreeLvl(e) {
  //alert("here"+e)
myDiagram.startTransaction("reexpand");
var level = e;
myDiagram.findTreeRoots().each(function(g) {
  //console.log(g.child);
  g.collapseTree(level);
//expandGroups(g, 0, level);
})
myDiagram.commitTransaction("reexpand");
}

but the findtreeroots give me the groups (leftside, rightside) instead of the item 0and the other one

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7422

Trending Articles