Skip to content
This repository was archived by the owner on Nov 7, 2018. It is now read-only.

Commit 5d2084e

Browse files
committed
Merge remote-tracking branch 'hongtaobai/master'
2 parents 6400fd4 + 65730dc commit 5d2084e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sankey/sankey.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,10 @@ d3.sankey = function() {
117117
remainingNodes.forEach(function(node) {
118118
node.x = x;
119119
node.dx = nodeWidth;
120-
node.sourceLinks.forEach(function(link) {
121-
nextNodes.push(link.target);
120+
node.sourceLinks.forEach(function (link) {
121+
if (nextNodes.indexOf(link.target) == -1) {
122+
nextNodes.push(link.target);
123+
}
122124
});
123125
});
124126
remainingNodes = nextNodes;

0 commit comments

Comments
 (0)