# computeNetworkLayout

Canonical: https://docs.shumoku.dev/en/library/api/computeNetworkLayout
Language: en

@shumoku/core · 0.4.0 · function

# computeNetworkLayout

[Source](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/layout/unified-engine.ts#L53)

Compute layout and return both ResolvedLayout and legacy LayoutResult. Use this when you need both (e.g., renderer-svg uses ResolvedLayout directly).

```
computeNetworkLayout(graph: NetworkGraph, options?: { composite?: boolean; compound?: boolean }): Promise<{ layout: LayoutResult; resolved: ResolvedLayout }>
```

## Parameters

| Parameter | Type | Description | Default |
| --- | --- | --- | --- |
| `graph` | `NetworkGraph` | No additional description. | `—` |
| `options` | `{ composite?: boolean; compound?: boolean }` | No additional description. | `{}` |

## Returns

```
Promise<{ layout: LayoutResult; resolved: ResolvedLayout }>
```

[`libs/@shumoku/core/src/layout/unified-engine.ts:53`](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/layout/unified-engine.ts#L53)
