fix: resolve conflict

This commit is contained in:
baizn 2020-04-09 20:38:13 +08:00 committed by Yanyan Wang
parent 600699b302
commit 294fbdd453

View File

@ -1934,7 +1934,6 @@ export default class Graph extends EventEmitter implements IGraph {
return true;
});
});
const edges = data.edges;
edges && edges.forEach(edge => {
const sourceDepth: number = dataDepthMap[edge.source] || 0;
@ -1944,14 +1943,6 @@ export default class Graph extends EventEmitter implements IGraph {
else depthMap[depth] = [edge.id];
});
data.edges.forEach(edge => {
const sourceDepth: number = dataDepthMap[edge.source] || 0;
const targetDepth: number = dataDepthMap[edge.target] || 0;
const depth = Math.max(sourceDepth, targetDepth);
if (depthMap[depth]) depthMap[depth].push(edge.id);
else depthMap[depth] = [ edge.id ];
});
depthMap.forEach(array => {
if (!array || !array.length) return;
for (let i = array.length - 1; i >= 0; i--) {