Skip to main content

Module selection

Module selection 

Source
Expand description

Renderer-neutral selection helpers.

These helpers turn canvas-space marquee rectangles into ordered selection state without depending on a renderer, DOM measurement, or platform input events.

Structs§

NodeDragStartSelectionInput
Input for resolving the selection side-effect of starting a node drag.
NodePointerDownDecision
Combined decision for a node pointer-down that may update selection and enable node dragging.
NodePointerDownInput
Input for resolving the first node pointer-down decision.
SelectionBoxDecision
Resolved selection-box outcome ready to be applied by a store or inspected by tests.
SelectionBoxInput
Renderer-neutral input for a canvas-space marquee selection gesture.
SelectionBoxOptions
Options for applying a marquee selection box.
SelectionBoxResult
Ordered selection result produced by a marquee selection box.
SelectionDragActivationInput
Screen-space input for deciding whether a marquee selection drag should activate.
SelectionPointerClaimInput
Normalized pointer state for deciding whether selection should claim a drag gesture first.

Enums§

NodeDragStartSelectionAction
Selection mutation implied by starting a node drag.
SelectionModifier
Modifier state that controls whether a selection gesture adds to existing selection.
SelectionPointerClaim
Selection’s current ownership status over a normalized pointer drag.

Functions§

compute_selection_box
Computes the ordered selection state for a canvas-space marquee selection box.
resolve_node_drag_start_selection
Resolves XyFlow-compatible selection behavior for a node-drag start.
resolve_node_pointer_down
Resolves the first headless decision for a node pointer-down.
resolve_selection_box
Resolves the ordered selection state for a canvas-space marquee selection gesture.
resolve_selection_pointer_claim
selection_drag_threshold_met
Returns whether pointer movement should start a marquee selection drag.