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

Can I control some node expand/collapse while others not?

$
0
0

@xiaoideasss wrote:

for example, I want to just make leaf2 to collapse when initialize (other nodes expand ). so I add isTreeExpanded: false to leaf2 object.
But it does not take effect, can anyone help?

myDiagram.model = new go.TreeModel([
          // these node data are indented but not nested according to the depth in the tree
          { key: "Root", color: lavgrad},
          { key: "Left1", parent: "Root", dir: "left", color: bluegrad },
          { key: "leaf1", parent: "Left1" },
          { key: "leaf2", parent: "Left1", isTreeExpanded: false },
          { key: "Left2", parent: "Left1", color: bluegrad },
          { key: "leaf3", parent: "Left2" },
          { key: "leaf4", parent: "Left2" },
 ]);

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6968

Trending Articles