Skip to content

Commit 16cce54

Browse files
author
Robert Jackson
committed
Keep track of parent and entry variables.
1 parent 461583b commit 16cce54

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

app/components/basic-tree.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,10 @@ export default Ember.Component.extend({
8787
.nodeSize([6, 180]);
8888
graph(root);
8989

90-
g.selectAll(".link")
91-
.data(root.descendants().slice(1))
92-
.enter()
90+
let link = g.selectAll(".link")
91+
.data(root.descendants().slice(1));
92+
93+
link.enter()
9394
.append("path")
9495
.attr("class", "link")
9596
.attr("d", function(d) {
@@ -100,7 +101,9 @@ export default Ember.Component.extend({
100101
});
101102

102103
let node = g.selectAll(".node")
103-
.data(root.descendants())
104+
.data(root.descendants());
105+
106+
let nodeEnter = node
104107
.enter()
105108
.append("g")
106109
.attr("class", function(d) { return "node" + (d.children ? " node--internal" : " node--leaf"); })

0 commit comments

Comments
 (0)