# `LivePanels.Graph.Bounds`
[🔗](https://github.com/livepanels/livepanels/blob/v0.1.0/lib/livepanels/graph/bounds.ex#L1)

Headless graph bounds helpers for viewport fitting and application controls.

# `selection`

```elixir
@type selection() :: LivePanels.Canvas.Selection.t()
```

# `viewport_target`

```elixir
@type viewport_target() :: %{
  left: number(),
  top: number(),
  width: number(),
  height: number(),
  right: number(),
  bottom: number()
}
```

# `bounds`

```elixir
@spec bounds(
  LivePanels.Canvas.State.t(),
  keyword()
) :: viewport_target() | nil
```

Returns the world-space bounds for graph-participating items.

# `selection_bounds`

```elixir
@spec selection_bounds(
  LivePanels.Canvas.State.t(),
  selection() | map() | String.t(),
  keyword()
) ::
  viewport_target() | nil
```

Returns the world-space bounds for a graph selection.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
