Skip to main content

SeatEdgeLabels

Function SeatEdgeLabels 

Source
pub fn SeatEdgeLabels(_: SeatEdgeLabelsProps) -> Element
Expand description

The labels of seat-anchored edges, as one world-space layer over every curve — so a connection crossing another never draws through its words.

With no label_view, edges that carry a label get it as text at their label_position. With one, it is called for every edge — the application decides which edges say something (a label being edited may not be in the edge’s label yet) and returns empty for the rest.

§Props

For details, see the props struct definition.

  • edges : ReadSignal<Vec<Edge>>

    The edges, in paint order.

  • anchors : ReadSignal<std::collections::BTreeMap<Id,ports::EdgeAnchors>>

    Solved anchors by edge id, from ports::solve_ports.

  • label_view : Option<Callback<SeatEdgeViewCtx,Element>>

    Custom renderer for one edge’s label (SVG content).

  • class : Option<String>

    Extra classes for the layer’s <svg>.