source:
node_modules/d3-hierarchy/src/hierarchy/links.js@
e4c61dd
| Last change on this file since e4c61dd was e4c61dd, checked in by , 6 months ago | |
|---|---|
|
|
| File size: 246 bytes | |
| Rev | Line | |
|---|---|---|
| [e4c61dd] | 1 | export default function() { |
| 2 | var root = this, links = []; | |
| 3 | root.each(function(node) { | |
| 4 | if (node !== root) { // Don’t include the root’s parent, if any. | |
| 5 | links.push({source: node.parent, target: node}); | |
| 6 | } | |
| 7 | }); | |
| 8 | return links; | |
| 9 | } |
Note:
See TracBrowser
for help on using the repository browser.
