Skip to content

Commit

Permalink
feat:Fix the width and height of the initial layout
Browse files Browse the repository at this point in the history
  • Loading branch information
pomelo-nwu committed Nov 17, 2019
1 parent 6418e79 commit 97182b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/graphin/src/controller/layout/defaultLayouts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ export type LayoutOption =

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const defaultLayouts = (graphin: Graphin, prevProps: GraphinProps) => {
const { width, height } = graphin.state;
const { graph } = graphin;
const width = graph.get('width');
const height = graph.get('height');

return [
{
Expand Down

0 comments on commit 97182b9

Please sign in to comment.