LivePanels.Toolkit.Graph (livepanels v0.1.0)

Copy Markdown View Source

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.

Summary

Functions

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Functions

begin_connector_attrs(item_or_id, port_or_name, overrides \\ %{})

@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(connector_or_id, endpoint, overrides \\ %{})

@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(overrides \\ %{})

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

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

cancel_reconnect_attrs(overrides \\ %{})

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

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

complete_connector_attrs(item_or_id, port_or_name, overrides \\ %{})

@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(item_or_id, port_or_name, overrides \\ %{})

@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(connector_or_id, overrides \\ %{})

@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(overrides \\ %{})

@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(overrides \\ %{})

@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(connector_or_id, overrides \\ %{})

@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(port, opts \\ %{})

@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(overrides \\ %{})

@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(connector_or_id, overrides \\ %{})

@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(connector_or_id, overrides \\ %{})

@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.