json_canvas/types
Types
pub type Canvas {
Canvas(nodes: List(Node), edges: List(Edge))
}
Constructors
-
Canvas(nodes: List(Node), edges: List(Edge))
pub type Edge {
Edge(
id: EdgeId,
from_node: NodeId,
from_side: Option(Side),
from_end: EndpointShape,
to_node: NodeId,
to_side: Option(Side),
to_end: EndpointShape,
color: Option(Color),
label: Option(EdgeLabel),
)
}
Constructors
-
Edge( id: EdgeId, from_node: NodeId, from_side: Option(Side), from_end: EndpointShape, to_node: NodeId, to_side: Option(Side), to_end: EndpointShape, color: Option(Color), label: Option(EdgeLabel), )
pub type EndpointShape {
WithArrow
WithoutArrow
}
Constructors
-
WithArrow
-
WithoutArrow
pub type GroupBackground {
GroupBackground(String)
}
Constructors
-
GroupBackground(String)
pub type GroupBackgroundStyle {
Cover
Ratio
Repeat
}
Constructors
-
Cover
-
Ratio
-
Repeat
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), )