pub struct Edge {
pub from: String,
pub to: String,
pub label: Option<String>,
pub style: EdgeStyle,
pub back: bool,
pub from_y: f64,
pub to_y: f64,
pub gutter: Option<f64>,
pub hook_x: Option<f64>,
pub floor: Option<f64>,
}Expand description
A positioned edge.
Fields§
§from: StringIdentifier of the node it leaves.
to: StringIdentifier of the node it arrives at.
label: Option<String>all or any, for an edge into a barrier.
style: EdgeStyleHow to draw it.
back: boolTrue when the edge points back towards the entry, which makes it a return path.
from_y: f64Where on the source’’s right edge this leaves, as an absolute y.
Edges all left from the node’’s centre, so several going to different places overlapped for their first stretch and only separated once they had already crossed each other. Spreading them down the edge, ordered by where they are going, means they never cross at the node they share.
to_y: f64Where on the target’’s left edge this arrives, as an absolute y.
gutter: Option<f64>For a return path, the x it climbs at. None for a forward edge.
Distinct per edge even when several return to the same agent. Sharing one gutter put four curves on the same vertical line with their labels stacked on top of each other.
hook_x: Option<f64>For a return path, where it hooks into the target’’s underside.
floor: Option<f64>For a return path, the depth it dips to. None for a forward edge.
Computed here rather than in the renderer because it decides how tall the drawing is, and a renderer that invented its own geometry would draw outside the reported extent — which is exactly how a review loop ends up clipped off the bottom of the diagram.