Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 8e4cbc8

Browse files
authored
Fix
1 parent 887a28d commit 8e4cbc8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/TreeView/widget/TreeView/RenderNode.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ define([
5353
this.draw(true);
5454

5555
this.setCollapsed(true);
56-
56+
57+
// set depth based on having a parent, root is 0, should be done before creating Rendering Edges.
58+
if (this.parent != null) {
59+
this.depth = this.parent.depth + 1;
60+
}
5761

5862
//setup child edges
5963
dojo.forEach(this.graphNode.getChildTypes(), function (type) {
@@ -67,7 +71,6 @@ define([
6771
}
6872
//place in parent
6973
else {
70-
this.depth = this.parent.depth + 1;
7174
this.getEdge().add(this);
7275
}
7376

0 commit comments

Comments
 (0)