Fix another d3v4 regression in the graph visualizer.

PiperOrigin-RevId: 156343038
This commit is contained in:
Dandelion Man? 2017-05-17 13:03:15 -07:00 committed by TensorFlower Gardener
parent 170f0b3507
commit c2b8927f25
2 changed files with 2 additions and 3 deletions

View File

@ -87,7 +87,7 @@ export function buildGroup(sceneGroup,
// Select all children and join with data.
// (Note that all children of g.edges are g.edge)
let edgeGroups = (container as any).selectAll('g.edge').data(edges, getEdgeKey);
let edgeGroups = (container as any).selectAll(function() {return this.childNodes;}).data(edges, getEdgeKey);
// Make edges a group to support rendering multiple lines for metaedge
edgeGroups.enter()

View File

@ -66,8 +66,7 @@ module tf.graph.scene.node {
// Select all children and join with data.
// (Note that all children of g.nodes are g.node)
let nodeGroups =
(container as any)
.selectAll('g.node')
(container as any).selectAll(function() {return this.childNodes;})
.data(nodeData, (d) => {
// make sure that we don't have to swap shape type
return d.node.name + ':' + d.node.type;