json_canvas/node

Types

pub type FilePath {
  FilePath(String)
}

Constructors

  • FilePath(String)
pub type GroupBackground {
  GroupBackground(String)
}

Constructors

  • GroupBackground(String)
pub type GroupLabel {
  GroupLabel(String)
}

Constructors

  • GroupLabel(String)
pub type Node {
  TextNode(
    id: NodeId,
    x: Int,
    y: Int,
    width: Int,
    height: Int,
    color: Option(Color),
    text: String,
  )
  FileNode(
    id: NodeId,
    x: Int,
    y: Int,
    width: Int,
    height: Int,
    color: Option(Color),
    path: FilePath,
    subpath: Option(SubPath),
  )
  LinkNode(
    id: NodeId,
    x: Int,
    y: Int,
    width: Int,
    height: Int,
    color: Option(Color),
    url: Url,
  )
  GroupNode(
    id: NodeId,
    x: Int,
    y: Int,
    width: Int,
    height: Int,
    color: Option(Color),
    label: Option(GroupLabel),
    background: Option(GroupBackground),
    background_style: Option(GroupBackgroundStyle),
  )
}

Constructors

  • TextNode(
      id: NodeId,
      x: Int,
      y: Int,
      width: Int,
      height: Int,
      color: Option(Color),
      text: String,
    )
  • FileNode(
      id: NodeId,
      x: Int,
      y: Int,
      width: Int,
      height: Int,
      color: Option(Color),
      path: FilePath,
      subpath: Option(SubPath),
    )
  • LinkNode(
      id: NodeId,
      x: Int,
      y: Int,
      width: Int,
      height: Int,
      color: Option(Color),
      url: Url,
    )
  • GroupNode(
      id: NodeId,
      x: Int,
      y: Int,
      width: Int,
      height: Int,
      color: Option(Color),
      label: Option(GroupLabel),
      background: Option(GroupBackground),
      background_style: Option(GroupBackgroundStyle),
    )
pub type SubPath {
  SubPath(String)
}

Constructors

  • SubPath(String)
pub type Url {
  Url(String)
}

Constructors

  • Url(String)

Functions

pub fn decode_node(
  dyn: Dynamic,
) -> Result(Node, List(DecodeError))
Search Document