PhoenixDnd.Port (phoenix_dnd v0.1.0)

Copy Markdown View Source

A connectable port rendered on a node.

Summary

Types

anchor()

@type anchor() :: :left | :right | :top | :bottom

direction()

@type direction() :: :input | :output | :bidirectional

t()

@type t() :: %PhoenixDnd.Port{
  anchor: anchor(),
  class: term(),
  data: term(),
  direction: direction(),
  id: String.t()
}

Functions

input(id, attrs \\ [])

@spec input(String.t(), map() | keyword()) :: t()

new!(port)

@spec new!(map() | keyword() | t()) :: t()

new!(id, attrs)

@spec new!(String.t(), map() | keyword()) :: t()

output(id, attrs \\ [])

@spec output(String.t(), map() | keyword()) :: t()