weasel API - v0.8.0
    Preparing search index...

    Function containedThenNearest

    • Region-aware snap. If the pointer falls inside any target's hitBounds, that target wins; otherwise falls back to nearest-origin. Useful for strategies whose targets are area-shaped (gutters, drop-zones, gridded cells) rather than point-shaped.

      Pointer-in-multiple-bounds order: first match in iteration order wins, so strategies should emit narrower/more-specific targets before broader ones (e.g. row-gutter before tray-corner).

      Type Parameters

      • TPose

      Returns LayoutSnap<TPose>