Skip to content

Commit

Permalink
🐛 fix(common): support user-defined layout option declaration
Browse files Browse the repository at this point in the history
ISSUES CLOSED: fix #75
  • Loading branch information
萌萌的老胖子 committed Apr 14, 2020
1 parent 84bbd9d commit 40e9179
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/graphin/src/controller/layout/defaultLayouts.ts
Expand Up @@ -7,7 +7,7 @@ import gridLayout, { GridLayoutOptions } from '../../layout/basic/grid';
import { RandomLayoutOptions } from '../../layout/basic/random';

import Graphin from '../../Graphin';
import { Data, ForceSimulation, GraphinProps } from '../../types';
import { Data, ForceSimulation, GraphinProps, LayoutOptionBase } from '../../types';

export type LayoutOption =
| CircleLayoutOption
Expand All @@ -16,7 +16,8 @@ export type LayoutOption =
| RandomLayoutOptions
| ForceLayoutOptions
| DagreLayoutOption
| GridLayoutOptions;
| GridLayoutOptions
| LayoutOptionBase;

const defaultLayouts = (graphin: Graphin, prevProps: GraphinProps) => {
const { graph } = graphin;
Expand Down

0 comments on commit 40e9179

Please sign in to comment.