Skip to main content

Canvas

Function Canvas 

Source
pub fn Canvas(props: CanvasProps) -> Element
Expand description

The pannable/zoomable surface every flow is drawn on.

Owns the FlowCore context, the container geometry, and the pane gestures: pan (drag or scroll), zoom (scroll or pinch), pane clicks, and the in-flight connection state machine that crate::Handles feed. Draws nothing itself: Flow passes its node/edge layers through the world slot, and an application using Canvas directly renders its own content there (in flow coordinates) and overlays as children (in screen coordinates).

An application-level gesture that starts on content inside the canvas can take the pointer away from the pane with FlowCore::claim_pointer; the pane then neither pans nor reports a pane click for that press.