# resolveNodePosition

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

@shumoku/core · 0.4.0 · function

# resolveNodePosition

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

Resolve a node's position against all other entities. Wrapper around \`resolvePosition\` for the legacy id-based API.

```
resolveNodePosition(id: string, x: number, y: number, nodes: Map<string, Node>, gap?: number, subgraphs?: Map<string, Subgraph>): { x: number; y: number }
```

## Parameters

| Parameter | Type | Description | Default |
| --- | --- | --- | --- |
| `id` | `string` | No additional description. | `—` |
| `x` | `number` | No additional description. | `—` |
| `y` | `number` | No additional description. | `—` |
| `nodes` | `Map<string, Node>` | No additional description. | `—` |
| `gap` | `number` | No additional description. | `DEFAULT_NODE_GAP` |
| `subgraphs` | `Map<string, Subgraph>` | No additional description. | `—` |

## Returns

```
{ x: number; y: number }
```

[`libs/@shumoku/core/src/layout/interaction.ts:107`](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/layout/interaction.ts#L107)
