Skip to content

Commit 63d8190

Browse files
committed
replace children by childrenNodes
1 parent ab1a0fb commit 63d8190

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/traces/sankey/calc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ function convertToD3Sankey(trace) {
111111

112112
nodes.push({
113113
group: (i > nodeCount - 1),
114-
children: [],
114+
childrenNodes: [],
115115
pointNumber: i,
116116
label: l,
117117
color: hasNodeColorArray ? nodeSpec.color[i] : nodeSpec.color

src/traces/sankey/render.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function sankeyModel(layout, d, traceIndex) {
9191
};
9292

9393
graph.nodes.unshift(child);
94-
groupingNode.children.unshift(child);
94+
groupingNode.childrenNodes.unshift(child);
9595
}
9696

9797
function computeLinkConcentrations() {
@@ -562,9 +562,9 @@ function attachDragHandler(sankeyNode, sankeyLink, callbacks) {
562562

563563
.on('dragend', function(d) {
564564
d.interactionState.dragInProgress = false;
565-
for(var i = 0; i < d.node.children.length; i++) {
566-
d.node.children[i].x = d.node.x;
567-
d.node.children[i].y = d.node.y;
565+
for(var i = 0; i < d.node.childrenNodes.length; i++) {
566+
d.node.childrenNodes[i].x = d.node.x;
567+
d.node.childrenNodes[i].y = d.node.y;
568568
}
569569
});
570570

0 commit comments

Comments
 (0)