Skip to content

Commit

Permalink
feat:set default force centripetalOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
pomelo-nwu committed Nov 20, 2019
1 parent 79afb0e commit 9fdde7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/graphin/src/controller/layout/defaultLayouts.ts
Expand Up @@ -156,8 +156,8 @@ const defaultLayouts = (graphin: Graphin, prevProps: GraphinProps) => {
repulsion: 200.0 * 5,
/** 向心力 */
centripetalOptions: {
leaf: 2,
single: 2,
leaf: 1.6,
single: 1.6,
},
/** 速度的减震因子,其实就是阻尼系数 */
damping: 0.9,
Expand Down
2 changes: 1 addition & 1 deletion packages/graphin/src/layout/force/ForceLayout.ts
Expand Up @@ -422,7 +422,7 @@ class ForceLayout {
const defaultRadio = {
left: 2,
single: 2,
others: 1 / getBaseLog(2, degree),
others: 1, // 1 / getBaseLog(2, degree),
center: () => {
return {
x: this.props.width / 2,
Expand Down

0 comments on commit 9fdde7f

Please sign in to comment.