Skip to content

Commit

Permalink
✨ add id, source, target on data when check data
Browse files Browse the repository at this point in the history
  • Loading branch information
zxc0328 committed Jan 7, 2020
1 parent ec1b63d commit 591a705
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/graphin/src/controller/layout/dataChecking.ts
Expand Up @@ -29,6 +29,10 @@ const dataChecking = (data: Data = { nodes: [], edges: [] }): Data => {
return {
shape: node.shape || 'CircleNode',
...node,
data: {
...node.data,
id: node.id,
},
};
});

Expand Down Expand Up @@ -67,6 +71,11 @@ const dataChecking = (data: Data = { nodes: [], edges: [] }): Data => {
dist: 20,
},
...edge,
data: {
...edge.data,
source: edge.source,
target: edge.target,
},
};
});

Expand Down

0 comments on commit 591a705

Please sign in to comment.