sridhars711 / dynatree

Automatically exported from code.google.com/p/dynatree
0 stars 0 forks source link

Level three and deeper not created when using object for structure #41

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If I initialize a tree using the following:
$('#tree').dynatree({children:[{title:'Level one',children:[{title:'Level
two',children:[{title:'Level three',children:[{title:'Level four'}]}]}]}]});

I only see the 'Level one' and 'Level two' nodes. The two other nodes are
never added.

Nodes that are either top-level nodes or child nodes to the top-level nodes
appear, but any nodes that are deeper in the tree seem to be lost.

Original issue reported on code.google.com by andreasblixt on 15 Oct 2008 at 9:04

GoogleCodeExporter commented 9 years ago
The following fix seems to work:

In DynaTreeNode.prototype.append, change:
for(var j=0; j<data.children.length; j++)
    dtnode.append(data.children[j]);
to:
dtnode.append(data.children);

Original comment by andreasblixt on 15 Oct 2008 at 9:14

GoogleCodeExporter commented 9 years ago

Original comment by moo...@wwwendt.de on 17 Oct 2008 at 5:58

GoogleCodeExporter commented 9 years ago
Fixed with r60 (thanks to Andreas Blixt)

Original comment by moo...@wwwendt.de on 19 Oct 2008 at 8:20

GoogleCodeExporter commented 9 years ago
considered verified

Original comment by moo...@wwwendt.de on 17 Jul 2012 at 4:12