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

Graph-extension DOM attr helpers and imports for Phoenix LiveViews.

`use LivePanels.Toolkit.Graph` imports `LivePanels.Toolkit.Canvas`, graph DOM
attr helpers, and graph marker helpers. Graph mutations stay on
`LivePanels.Graph`.

# `begin_connector_attrs`

```elixir
@spec begin_connector_attrs(
  LivePanels.Item.t() | map() | String.t(),
  map() | String.t(),
  keyword() | map()
) :: map()
```

Returns attrs for an application control that starts a new connector from an output port.

# `begin_reconnect_attrs`

```elixir
@spec begin_reconnect_attrs(
  LivePanels.Item.t() | String.t(),
  :from | :to | String.t(),
  keyword() | map()
) :: map()
```

Returns attrs for an application control that starts reconnecting one endpoint of a connector.

# `cancel_connector_attrs`

```elixir
@spec cancel_connector_attrs(keyword() | map()) :: map()
```

Returns attrs for an application control that cancels the current pending connector.

# `cancel_reconnect_attrs`

```elixir
@spec cancel_reconnect_attrs(keyword() | map()) :: map()
```

Returns attrs for an application control that cancels the current connector reconnect draft.

# `complete_connector_attrs`

```elixir
@spec complete_connector_attrs(
  LivePanels.Item.t() | map() | String.t(),
  map() | String.t(),
  keyword() | map()
) :: map()
```

Returns attrs for an application control that completes a new connector on an input port.

# `complete_reconnect_attrs`

```elixir
@spec complete_reconnect_attrs(
  LivePanels.Item.t() | map() | String.t(),
  map() | String.t(),
  keyword() | map()
) :: map()
```

Returns attrs for an application control that completes the current connector reconnect draft.

# `disconnect_attrs`

```elixir
@spec disconnect_attrs(LivePanels.Item.t() | String.t(), keyword() | map()) :: map()
```

Returns attrs for an application control that removes an existing connector.

# `graph_fit_attrs`

```elixir
@spec graph_fit_attrs(keyword() | map()) :: map()
```

Returns attrs for an application control that fits the full graph in the viewport.

# `graph_fit_selection_attrs`

```elixir
@spec graph_fit_selection_attrs(keyword() | map()) :: map()
```

Returns attrs for an application control that fits the current graph selection in the viewport.

# `graph_include_connector_attrs`

```elixir
@spec graph_include_connector_attrs(
  LivePanels.Item.t() | String.t(),
  keyword() | map()
) :: map()
```

Returns attrs for an application control that includes one connector in the graph selection.

# `graph_port_anchor_attrs`

```elixir
@spec graph_port_anchor_attrs(map(), keyword() | map()) :: map()
```

Returns attrs for the DOM element that represents one graph port anchor.

# `graph_select_all_attrs`

```elixir
@spec graph_select_all_attrs(keyword() | map()) :: map()
```

Returns attrs for an application control that selects every visible graph item and connector.

# `graph_select_connector_attrs`

```elixir
@spec graph_select_connector_attrs(
  LivePanels.Item.t() | String.t(),
  keyword() | map()
) :: map()
```

Returns attrs for an application control that replaces the graph selection with one connector.

# `graph_toggle_connector_selection_attrs`

```elixir
@spec graph_toggle_connector_selection_attrs(
  LivePanels.Item.t() | String.t(),
  keyword() | map()
) ::
  map()
```

Returns attrs for an application control that toggles one connector in the graph selection.

---

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