Skip to content

Commit

Permalink
fix: d3-force get node data correctly (#232)
Browse files Browse the repository at this point in the history
* fix: d3-force get node data correctly

* chore: update version
  • Loading branch information
yvonneyx authored Sep 14, 2024
1 parent d1bff78 commit 468eb36
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/layout/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/layout",
"version": "1.2.14-beta.6",
"version": "1.2.14-beta.7",
"description": "graph layout algorithm",
"license": "MIT",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions packages/layout/src/d3-force/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ export class D3ForceLayout<

const nodes = graph.getAllNodes().map(({ id, data }) => ({
id,
data,
...pick(data, this.config.inputNodeAttrs),
...data,
...pick(data.data, this.config.inputNodeAttrs),
}));

const edges = graph.getAllEdges().map((edge) => ({ ...edge }));
Expand Down

0 comments on commit 468eb36

Please sign in to comment.